我想在安裝npm模塊後啓動一個項目。在WebStorm中使用npm start獲取錯誤
當我鍵入npm start
我得到:
There is an error in your gulpfile:
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/Users/tkhusid/WebstormProjects/Ionic-`enter code here`radar/ionic-radar/config/gulp/index.js:1:63)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
此外,我得到另一個錯誤,這個錯誤旁:
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev:stub"
npm ERR! node v4.6.0
npm ERR! npm v2.15.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] dev:stub: `ionic serve --environment local`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev:stub script 'ionic serve --environment local'.
npm ERR! This is most likely a problem with the techradar-ionic package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic serve --environment local
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs techradar-ionic
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls techradar-ionic
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/tkhusid/WebstormProjects/Ionic-radar/ionic-radar/npm-debug.log
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
npm ERR! node v4.6.0
npm ERR! npm v2.15.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] dev: `npm run dev:stub`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script 'npm run dev:stub'.
npm ERR! This is most likely a problem with the techradar-ionic package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run dev:stub
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs techradar-ionic
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls techradar-ionic
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/tkhusid/WebstormProjects/Ionic-radar/ionic-radar/npm-debug.log
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v4.6.0
npm ERR! npm v2.15.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `npm run dev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'npm run dev'.
npm ERR! This is most likely a problem with the techradar-ionic package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run dev
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs techradar-ionic
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls techradar-ionic
npm ERR! There is likely additional logging output above.
我已經開始與項目的克隆。 該項目已成功克隆。
非常感謝您的任何幫助。
嘗試使用nodejs v6而不是v4;節點v6有更好的支持ecmascript 6和錯誤似乎與此有關(代碼正在寫入es6) –
謝謝。現在試試吧 –
沒有幫助:( –