angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

ng command is not working anymore

Open dalidovski opened this issue 9 years ago • 10 comments

OS?

Windows 7

Versions.

@angular/[email protected]

Error description

When I run ng command, I'm getting below error. Please note angular-cli was working fine.

config.js:15 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. (C:\Users\Dalidovski\AppData\Roaming\npm\node_modules
@angular\cli\models\config.js:2:18) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10)

Please help !

dalidovski avatar Feb 22 '17 22:02 dalidovski

What version of node and npm do you have?

andrej2704 avatar Feb 22 '17 22:02 andrej2704

node v4.4.1 npm 4.2.0

dalidovski avatar Feb 22 '17 22:02 dalidovski

On ubuntu I had similar error yesterday with node 4.x, fixed by upgrade to 6.x

See docs: https://github.com/angular/angular-cli#prerequisites

andrej2704 avatar Feb 22 '17 22:02 andrej2704

@dalidovski With the latest release, the minimum requirement for node is version 6.9.0.

divyang-joshi avatar Feb 22 '17 22:02 divyang-joshi

I have updated node to last version and It works fine now. Thank you.

dalidovski avatar Feb 22 '17 23:02 dalidovski

@dalidovski glad everything is working. If there is no longer an problem would you close this issue?

deebloo avatar Feb 23 '17 00:02 deebloo

I installed today and got the same issue. Had gone through updating node and npm to latest (8.2.1,5.3.0) and still doesn't work. I don't really want to downgrade node but I will give it a try.

taltool avatar Jul 27 '17 09:07 taltool

how to update the node ..??? i have tried all the ways to update or upgrade still my node version is v4.2.6?? wt should i do?

deepakpookkote avatar Aug 07 '17 04:08 deepakpookkote

@deepakpookkote Clear NPM's cache: sudo npm cache clean -f Install a little helper called 'n' sudo npm install -g n Install latest stable Node.js version sudo n stable

dalidovski avatar Aug 07 '17 08:08 dalidovski

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.