title: Gulp require "Cannot Find Module" even though it exists
body: <p>I've encountered a strange issue and I'm running out of ideas to try. I'm trying to learn JS unit testing, so am setting up gulp with Jasmine. The problem is, when my gulp build runs I get:</p>
  
  <pre><code>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.&lt;anonymous&gt; (/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)
  </code></pre>
  
  <p>Now, I know this is a common issue, but I've tried everything that typically resolves these. My <strong>package.json</strong>:</p>
  
  <pre><code>{
    "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"
    }
  }
  </code></pre>
  
  <p>And my <code>./node_modules</code> folder:</p>
  
  <p><img src="https://i.stack.imgur.com/s72UG.png" alt="node modules folder"></p>
  
  <p>I've tried doing an <code>rm -rf ./node_modules</code> to clear it out and then followed by <code>npm install</code> to load fresh copies. I can clearly see module their, and all the other modules load just fine, it's just this one.</p>
  
  <p>My <strong>gulpfile.js</strong> looks like this:</p>
  
  <pre><code>/**
   * 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.'
      }));
  });
  </code></pre>
  
  <p>When I run <code>gulp test</code>, I get the missing module error. If I comment out the task and comment the require for <strong>gulp-jasmin</strong>, it will require the other modules without a hitch.</p>
  
  <p>Any ideas what I can do to get it to recognize <a href="https://github.com/sindresorhus/gulp-jasmine" rel="nofollow noreferrer">this module</a>? Is there some sort of <em>autoload</em> or <em>registration</em> that it is suppose to do with npm that I can check?</p>