2

我有一个从 angular2-seed 开始的相当新鲜的项目。直到昨天,一切npm install都正常工作。昨天,我在组合中添加了另一个依赖项(bootstrap-sass),安装后任务开始失败并出现以下错误:

[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! angular-seed@0.0.0 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 angular-seed@0.0.0 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并重新安装所有内容,但没有帮助。我错过了什么?

更新

解决此问题所采取的步骤:

  1. 安装新鲜种子

  2. npm install

  3. npm start

所有作品

  1. 做一些代码更改

所有作品

  1. 手动将依赖项添加到 package.json

  2. rm -rf mode_modules

  3. npm install

错误如上。

正如我所提到的,从那时起,我尝试了不同的方法来重新安装所有内容,包括npm install bootstrap-sass --save......相同的结果。

4

1 回答 1

3

尝试删除 gulpfile.js

我有同样的问题,这有帮助。在这里找到解决方案:https ://github.com/mgechev/angular-seed/issues/902

于 2017-05-04T08:38:24.740 回答