Angular-cli: Syntax error :Use of const in strict mode when creating new project

Created on 30 May 2016  路  4Comments  路  Source: angular/angular-cli

I have installed Ubuntu 15.04 and node version 0.10.25. When i try creating a new project ng new winni-ng2 I get the ouput below. I get the same error when i try running ng --version also.

//OutPut
/usr/local/lib/node_modules/angular-cli/bin/ng:7
const resolve = require('resolve');
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3

Most helpful comment

You need Node 5 or above for the current CLI and Angular 2 packages.

All 4 comments

You can check if your node version is too old . @winni4eva

You need Node 5 or above for the current CLI and Angular 2 packages.

@filipesilva Just came across this issue as one of our devs had the same error. Just want to point out that I've got node 4.4.7, npm 3.10.6 and angular-cli works like a charm.

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._

Was this page helpful?
0 / 5 - 0 ratings