ng command fails in Windows 10 with current CLI version
I have globally installed the CLI using the latest npm.
I am running Windows 10, 64-bit and the provided msi was used to install npm. When I run ng, this is what I get: :>ng C:\Users\Caribbean1\AppData\Roaming\npm\node_modules@angular\cli\bin\ng:7 const CliConfig = require('../models/config').CliConfig; ^^^^^ SyntaxError: Use of const in strict mode. at exports.runInThisContext (vm.js:73:16) at Module._compile (module.js:443:25) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Function.Module.runMain (module.js:501:10) at startup (node.js:129:16) at node.js:814:3
C:>
Bug Report or Feature Request (mark with an x)
- [x ] bug report -> please search issues before submitting
- [ ] feature request
Versions.
Repro steps.
The log given by the failure.
Desired functionality.
Mention any other details that might be useful.
Can you check your node version?
https://github.com/angular/angular-cli/issues/6187 https://github.com/angular/angular-cli/issues/4672
Hi Stefan,
Thank you very much for contacting me.
These are my versions:
dotnet : 1.0.4
node: V0.12.2
npm: 2.7.4
Running also Visual Studio 2017 Enterprise on Windows 10 64-bit.
Ricardo Sanchez (561) 372-9299
From: Stefan Negele [email protected] Sent: Monday, June 12, 2017 8:48 AM To: angular/angular-cli Cc: ricardo-1937; Author Subject: Re: [angular/angular-cli] ng command fails in Windows 10 with current CLI version (#6638)
Can you check your node version?
#6187https://github.com/angular/angular-cli/issues/6187 #4672https://github.com/angular/angular-cli/issues/4672
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/angular/angular-cli/issues/6638#issuecomment-307779310, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGo8RbJB7DxuPbuqqKQQowzbIT8R7qIAks5sDTO5gaJpZM4N2FSh.
Please check out the old issues i referenced. You need to update your node and npm. I think this can be closed :)
Stefan,
I downloaded and installed the latest version of Node which is V8.1.0, however that number is not what is displayed when you do the version command (as shown in the shot).
Can that be the problem?
Ricardo Sanchez (561) 372-9299
From: Stefan Negele [email protected] Sent: Monday, June 12, 2017 1:20 PM To: angular/angular-cli Cc: ricardo-1937; Author Subject: Re: [angular/angular-cli] ng command fails in Windows 10 with current CLI version (#6638)
Please check out the old issues i referenced. You need to update your node and npm.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/angular/angular-cli/issues/6638#issuecomment-307856859, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGo8RXk3DMI75a5H5ESE1N5a_IrMoDcyks5sDXNrgaJpZM4N2FSh.
Do you run the cli from Visual Studio somehow? Then try to set the right node version there: https://stackoverflow.com/questions/43849585/update-node-version-in-visual-studio-2017
If not check your path: https://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them
This seems not to be an issue with the cli but with your node installation.
Agreed, this is not an issue with the CLI, but instead an environment issue, closing. Thanks to those who commented with debug info and resourceful links.
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.