错误:找不到带有angular2-seed的模块check.versions

时间:2017-02-27 18:24:12

标签: angular angular2-seed

我有一个相当新鲜的项目从angular2-seed开始。 直到昨天,所有npm install都没有问题。 昨天,我在mix(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

  4. 所有作品

    1. 进行一些代码更改
    2. 所有作品

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

      2. rm -rf mode_modules

      3. npm install

      4. 如上所述出错。

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

1 个答案:

答案 0 :(得分:3)

尝试删除gulpfile.js

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