我正在尝试在Visual Studio 2015中构建Cordova项目,但出现以下错误:'在严格模式下使用const。'现在已经有一段时间了。
这是我的构建输出:
1>------ Build started: Project: ChemTreatApp, Configuration: Debug iOS ------
1> ------ Ensuring correct global installation of package from source package directory: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\APACHECORDOVATOOLS\packages\vs-tac
1> ------ Name from source package.json: vs-tac
1> ------ Version from source package.json: 1.0.42
1> ------ Package already installed globally at correct version.
1> ------ Cordova tools 5.3.3 already installed.
1> ------ Build Settings:
1> ------ Build Settings:
1> ------ platformConfigurationBldDir: D:\Patient 360\Code\ChemTreatApp\bld\iOS\Debug
1> ------ platformConfigurationBinDir: D:\Patient 360\Code\ChemTreatApp\bin\iOS\Debug
1> ------ buildCommand: prepare
1> ------ platform: iOS
1> ------ cordovaPlatform: ios
1> ------ configuration: Debug
1> ------ cordovaConfiguration: Debug
1> ------ projectName: ChemTreatApp
1> ------ projectSourceDir: D:\Patient 360\Code\ChemTreatApp
1> ------ npmInstallDir: C:\Users\safan.allauddin\AppData\Roaming\npm
1> ------ language: en-US
1> ------ Adding platform: ios
1> SyntaxError: C:\Users\safan.allauddin\AppData\Roaming\npm\node_modules\vs-tac\node_modules\cordova\5.3.3\node_modules\cordova\node_modules\cordova-lib\node_modules\request\node_modules\tough-cookie\node_modules\ip-regex\index.js:3
1> const v4 = '(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])(?:\\.(?:25[0-
1> ^^^^^
1> Use of const in strict mode.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
我的cordova CLI版本是5.3.3,NPM版本6.7.0,节点版本是11.10.0。
谢谢。