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

ng --v returns "SyntaxError: Use of const in strict mode."

Open 2rik opened this issue 9 years ago • 6 comments

Please provide us with the following information:

OS?

Windows 7 64 bit.

Versions.

angular/cli: v1.0.0-beta.30 npm: 4.2.0 System Path: C:\Users{user}\AppData\Roaming\npm

Repro steps.

Running ng --version returns:

C:\Users{user}\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

2rik avatar Feb 13 '17 18:02 2rik

Try using node v6.9.x.

#goodnessSquad

sthuck avatar Feb 15 '17 18:02 sthuck

@2rik can you please confirm your version of node?

The minimum supported version is 6.9 for @angular/cli beta.30+

Brocco avatar Feb 15 '17 19:02 Brocco

@sthuck @Brocco Thanks, resolved now. Had to manually download and replace nodejs.exe, cause automatic installation have not replaced executable.

2rik avatar Feb 16 '17 10:02 2rik

Reported as fixed/working, closing this issue.

Brocco avatar Feb 20 '17 04:02 Brocco

Hi @sthuck

I am getting the same error on ng --v returns Can you suggest what you have exactly?

rajneeshkumardev avatar Feb 14 '18 10:02 rajneeshkumardev

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.