Please provide us with the following information:
- OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Windows 8
node v4.1.1
npm v3.8.7- Versions. Please run
ng --version. If there's nothing outputted, please run
in a Terminal:node --versionand paste the result here:
'ng --version' also throws same syntax error
I uninstalled angular-cli globally and then installed: npm install -g angular-cli@webpack
when trying to run 'ng new PROJ_NAME' (or any other ng command) I get:
Error while running script "C:\nodejs\node_modules\angular-cli\addon\ng2\models\config\config.ts":
SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:413:25)
at Object.require.extensions..ts (C:\nodejs\node_modules\angular-cli\lib\bootstrap-local.js:30:14)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module._load (C:\nodejs\node_modules\angular-cli\lib\bootstrap-local.js:55:22)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.
at Module._compile (module.js:434:26)
Error while running script "C:\nodejs\node_modules\angular-cli\addon\ng2\models\config.ts":
SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:413:25)
at Object.require.extensions..ts (C:\nodejs\node_modules\angular-cli\lib\bootstrap-local.js:30:14)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module._load (C:\nodejs\node_modules\angular-cli\lib\bootstrap-local.js:55:22)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.
at Module._compile (module.js:434:26)
C:\nodejs\node_modules\angular-cli\addon\ng2\models\config\config.ts:23
this._config = new (schema_class_factory_1.SchemaClassFactory(schema))(configJson, ...fallbacks);
^^^
SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:413:25)
at Object.require.extensions..ts (C:\nodejs\node_modules\angular-cli\lib\bootstrap-local.js:30:14)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module._load (C:\nodejs\node_modules\angular-cli\lib\bootstrap-local.js:55:22)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.
at Module._compile (module.js:434:26)
Thanks! We'll be in touch soon.
Same issue on OS X 10.11.6
$ npm --version
3.10.6
$ node --version
v4.5.0
Same issue here using Windows 10
$ npm --version
3.10.7
$ node --version
v4.5.0
You need to use node v6.5.0.
@bonnici This fixed it!
Thanks!
Thanks , problem gets solved..
Thanks for helppp!!!!
The documentation indicates that
Both the CLI and generated project have dependencies that require Node 4 or higher, together with NPM 3 or higher.
I have a need to remain on node 4.7.2 and npm 3.10.10 - so does that mean im SOL?
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._
Most helpful comment
You need to use node v6.5.0.