ng command is not working anymore
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.
@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 !
What version of node and npm do you have?
node v4.4.1 npm 4.2.0
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
@dalidovski With the latest release, the minimum requirement for node is version 6.9.0.
I have updated node to last version and It works fine now. Thank you.
@dalidovski glad everything is working. If there is no longer an problem would you close this issue?
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.
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 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
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.