Running "ng" calls "Unexpected token ..."
When I run ng with any command it calls
ng -v
C:\nodejs\node_modules\@angular\cli\models\config\config.js:16
constructor(_configPath, schema, configJson, fallbacks = []) {
^
SyntaxError: Unexpected token =
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (C:\nodejs\node_modules\@angular\cli\models\config.js:3:18)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
node -v v6.10.0
npm -v 4.4.1
I tried reinstalling node, npm and @ angular / cli. No solution helped.
@Edited, Solution
I removed ng, ng.cmd from C: \ nodejs \ and folders @ angular / cli /, angular-cli / fromC: \ nodejs \ node_modules and reinstalled @ angular / cli, and then it works correctly.
0
source to share
No one has answered this question yet
See similar questions:
or similar: