2017-02-27 64 views
2

我有一個相當新的項目從angular2種子開始。 直到昨天,一切npm install工作沒有問題。 昨天,我又增加了依賴到混合(引導-SASS)和安裝後的任務啓動失敗,出現以下錯誤:錯誤:找不到模塊check.versions與angular2種子

[01:07:09] Using gulpfile ~/Dev/indago/indago/journeymap/gulpfile.js 
[01:07:09] Starting 'check.versions'... 
[01:07:09] 'check.versions' errored after 174 μs 
[01:07:09] Error: Cannot find module '/Users/ShurikAg/Dev/indago/indago/journeymap/tools/tasks/seed/check.versions' 
    at Function.Module._resolveFilename (module.js:469:15) 
    at Function.Module._load (module.js:417:25) 
    at Module.require (module.js:497:17) 
    at require (internal/module.js:20:19) 
    at Gulp.<anonymous> (/Users/ShurikAg/Dev/indago/indago/journeymap/tools/utils/seed/tasks_tools.js:107:34) 
    at module.exports (/Users/ShurikAg/Dev/indago/indago/journeymap/node_modules/orchestrator/lib/runTask.js:34:7) 
    at Gulp.Orchestrator._runTask (/Users/ShurikAg/Dev/indago/indago/journeymap/node_modules/orchestrator/index.js:273:3) 
    at Gulp.Orchestrator._runStep (/Users/ShurikAg/Dev/indago/indago/journeymap/node_modules/orchestrator/index.js:214:10) 
    at Gulp.Orchestrator.start (/Users/ShurikAg/Dev/indago/indago/journeymap/node_modules/orchestrator/index.js:134:8) 
    at /Users/ShurikAg/Dev/indago/indago/journeymap/node_modules/gulp/bin/gulp.js:129:20 

npm ERR! Darwin 16.4.0 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" 
npm ERR! node v6.9.2 
npm ERR! npm v3.10.9 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] postinstall: `gulp check.versions && gulp build.bundle.rxjs && npm prune && gulp webdriver && gulp print.banner` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script 'gulp check.versions && gulp build.bundle.rxjs && npm prune && gulp webdriver && gulp print.banner'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the angular-seed package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  gulp check.versions && gulp build.bundle.rxjs && npm prune && gulp webdriver && gulp print.banner 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs angular-seed 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls angular-seed 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  /Users/ShurikAg/Dev/indago/indago/journeymap/npm-debug.log 

現在,即使我刪除了新的依賴失敗。 任務的文件已到位。 我也嘗試刪除node_modules並重新安裝一切,它沒有幫助。 我錯過了什麼?採取

UPDATE

步驟來解決這個問題:

  1. 安裝新的種子

  2. npm install

  3. npm start

所有工作

  • 做一些代碼改變
  • 所有工作

  • 手動添加依賴性package.json

  • rm -rf mode_modules

  • npm install

  • 錯誤按照上述。

    正如我所提到的,從那以後,我嘗試了不同的方式重新安裝包括npm install bootstrap-sass --save在內的所有東西......同樣的結果。

    +0

    爲什麼你要手動添加依賴項'npm install(node_module_name)--save'綽綽有餘 – Aravind

    +0

    因爲結果是完全一樣的。我試過兩種方式 –

    +0

    兩種方式顯示相同的錯誤? – Aravind

    回答

    相關問題