2017-11-23 3 views
0

Windows上Ember.jsをインストールしようとしている(そしておそらく他のシステム)は、次のコマンドを実行した後:エンバーのインストール時の問題:にSyntaxError:strictモードでのconstの使用

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

エラーが発生しません、どのように

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) 

これは私のエンバーのインストールで問題を示唆しているが、私はこれをどのように対処することができます。コマンドember -vには、以下の出力しますか?

答えて

0

この解決策はいくつかの回答、たとえばthis oneで提案されていますが、この正確な解決策はWindowsでは動作しません。

代わりに、最も良い解決策は、latest version of Nodeをインストーラでインストールすることです。インストール後に確認するに

は、次のことを試してください。

のような何かを出力する必要があり
node --version 

v8.9.1 

は以前、このコマンドは低いバージョン番号を与えているだろう。私の場合、それはv0.12に似ていました。

関連する問題