Reputation: 8108
Installed angular CLI through the command below.
npm install -g angular-cli@webpack
It got installed with the following message:
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: This package has been discontinued in favor of lodash@^4.0.0.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
/usr/local/bin/ng -> /usr/local/lib/node_modules/angular-cli/bin/ng
/usr/local/lib
└─┬ [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│ └─┬ [email protected]
│ └── [email protected]
└── UNMET PEER DEPENDENCY [email protected]
npm WARN @angular/[email protected] requires a peer of typescript@^1.9.0-dev but none was installed.
npm WARN [email protected] requires a peer of typescript@^1.8.0 || ^1.9.0-dev but none was installed.
npm WARN [email protected] requires a peer of typescript@^1.8.0 || ^1.9.0-dev but none was installed.
Now whenever I try to use ng new proj_name
command it shows following error:
/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:929:3
What is the problem here?
Update:
Node Version : v0.10.35
Npm Version : 3.10.5
Upvotes: 1
Views: 1546
Reputation: 1444
const
was introduced by ES6
and node
versions below 0.12 don't support it.
Try updating your node
version
Check this link for a detailed explanation
Upvotes: 2
Reputation: 12205
The warning you got is "normal", I also got them and the cli works.
The solution seems related to your version of node (see this answer or this GitHub issue).
Upvotes: 1