0

when i try to build the ios release version using ionic 1 frame work, below exception am getting, please help me to solve this issuse

   const word = '[a-fA-F\\d:]'; 
  SyntaxError: C:\Users\***\AppData\Roaming\npm\node_modules\vs- 
  tac\node_modules\cordova\6.2.0\node_modules\cordova\node_modules\cordova- 
  lib\node_modules\request\node_modules\tough-cookie\node_modules\ip- 
  regex\index.js:3
  Use of const in strict mode.
  ^^^^^^^^^^^^^^

System information:

 Ionic:
 ionic (Ionic CLI) : 4.9.0 
   Ionic Framework   : ionic1 1.3.1
@ionic/v1-toolkit : not installed

Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)

System:
NodeJS : v10.14.1 
npm    : 6.4.1
OS     : Windows 7
Vinay
  • 59
  • 7
  • maybe it's a NodeJS version issue? see ["syntaxerror use of const in strict mode"](https://stackoverflow.com/questions/22603078/syntaxerror-use-of-const-in-strict-mode) – Kaddath Jan 25 '19 at 09:28
  • @Kaddath tried by upgrading the Node JS with latest version and tested bu the same error .. – Vinay Jan 25 '19 at 13:35

1 Answers1

1

As far as I know Ionic 1 uses Angular 1 which uses ES5, and const is part of ES6.

Mr.P
  • 1,390
  • 13
  • 35
  • @Vinay actually, if he's right (haven't checked), it would mean that you shouldn't use the `const` keyword at all – Kaddath Jan 25 '19 at 14:06
  • @Kaddath as if its an auto generated files from the npm, when we tried to build the project, tried by deleting that whole folder and build again that same.. – Vinay Jan 28 '19 at 11:24
  • @Vinay strange issue, can you identify what generates the files? maybe you have installed Ionic 2 plugins with Ionic 1? (don't know if even possible though) – Kaddath Jan 28 '19 at 14:47