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
javascript node.js angular npm angular-cli


source to share


No one has answered this question yet

See similar questions:

3
ng test - unexpected token 'const'

or similar:

3
module.js: 339 throw err; Error: Cannot find module "npmlog" on WINDOWS 8 Pro
2
node.js with underscore on linux Error: Cannot find module 'underscore'
2
Unexpected token {in wit.js
1
angular-cli + mvn: unable to start build
1
Ungit stopped working after update
0
angular cli failed to install additional dependency
0
Error "ng serve" on cmd
0
How do I deploy a NodeJS app running over HTTPS?
0
Why can't I run ng command after angular cli is installed successfully?
0
Node.js error (NPM error)



All Articles
Loading...
X
Show
Funny
Dev
Pics