尽pipe它存在,但是Gulp要求“找不到模块”

我遇到了一个奇怪的问题,我现在想尽办法。 我试图学习JSunit testing,所以我正在与Jasmine一起build立一个gulp。 问题是,当我的gulp版本运行时,我得到:

Error: Cannot find module 'gulp-jasmin' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (/Users/path/to/project/gulpfile.js:5:19) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) 

现在,我知道这是一个普遍的问题,但我已经尝试了所有解决这些问题的方法。 我的package.json

 { "name": "boxfish", "version": "0.3.0", "devDependencies": { "gulp": "^3.9.0", "gulp-jasmine": "^2.0.1", "gulp-livereload": "^3.8.0", "gulp-notify": "^2.2.0", "gulp-uglify": "^1.2.0" } } 

和我的./node_modules文件夹:

节点模块文件夹

我试着做一个rm -rf ./node_modules清除它,然后npm install加载新的副本。 我可以清楚地看到它们的模块,而其他所有的模块加载都很好,只是这个。

我的gulpfile.js看起来像这样:

 /** * Dependencies *****************/ var gulp = require('gulp'); var jasmine = require('gulp-jasmin'); var notify = require('gulp-notify'); /** * Unit Testing *****************/ gulp.task('test', function () { gulp.src('./tests/*.js') .pipe(jasmine()) .on('error', notify.onError({ title: 'Jasmine Test Failed', message: 'One or more tests failed, see the cli for details.' })); }); 

当我运行gulp test ,我得到了缺less的模块错误。 如果我将这个任务评论出来,并且评论一下gulp-jasmin的需求 ,那么就需要其他模块没有任何障碍。

任何想法我能做些什么来让它认识到这个模块 ? 是否有某种自动加载注册 ,它是与npm,我可以检查?

你肯定这不只是一个错字? 你的大文件和错误使你看起来像错误的吞咽茉莉(错过了'e'的结尾):

 Error: Cannot find module 'gulp-jasmin' var jasmine = require('gulp-jasmin');