0

When trying to install Ember.js on Windows (and possibly other systems), after running the following commands:

npm install -g npm
npm install -g ember-cli
npm install -g bower

No errors are raised, how the command ember -v outputs the following:

C:\Users\<user>\AppData\Roaming\npm\node_modules\ember-cli\lib\cli\index.js:3
const willInterruptProcess = require('../utilities/will-interrupt-process');
^^^^^
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 Module.require (module.js:365:17)
    at require (module.js:384:17)
    at C:\Users\Shayn\AppData\Roaming\npm\node_modules\ember-cli\bin\ember:26:11
    at C:\Users\Shayn\AppData\Roaming\npm\node_modules\ember-cli\node_modules\resolve\lib\async.js:50:13
    at processDirs (C:\Users\Shayn\AppData\Roaming\npm\node_modules\ember-cli\node_modules\resolve\lib\async.js:182:39)

This suggests an issue with my Ember installation, how can I address this?

shayaan
  • 1,482
  • 1
  • 15
  • 32

1 Answers1

0

The solution is suggested in a few other answers, for example this one, however this exact solution will not work on Windows.

Instead, the best solution is to get the latest version of Node installed via an installer.

To verify after installation try the following:

node --version

Which should output something like:

v8.9.1

Previously this command would have given a lower version number. In my case it was similar to v0.12.

shayaan
  • 1,482
  • 1
  • 15
  • 32