title: Error: Cannot find module ' gulp-sass'
body: <p>I'm having trouble getting gulp to read my modules.</p>
  
  <p>Initially I had a working system.</p>
  
  <p>I then upgraded to with NVM (I removed everything installed with Brew first)</p>
  
  <p>Here's what I have now:</p>
  
  <pre><code>"node: v6.11.2"
  "npm: 3.10.10"
  "nvm"
  </code></pre>
  
  <p>and I have a gulpfile which used to work, but I also upgraded my modules, and I have installed locally in my project:</p>
  
  <pre><code>"gulp": "^3.9.1",
  "gulp-pug": "^3.3.0",
  "gulp-sass": "^3.1.0"
  </code></pre>
  
  <p>globally for this version of node I do have:</p>
  
  <pre><code>gulp-cli@1.4.0
  jshint@2.9.5
  npm@3.10.10
  </code></pre>
  
  <p>in a simple gulpfile running: gulp would work successfully, but introducing other modules is where I started getting issues.</p>
  
  <p>In my gulpfile I have for example: </p>
  
  <pre><code>var gulp = require('gulp');
  
  var sass = require(' gulp-sass'),
  prefixer = require('gulp-autoprefixer'),
  minifycss = require('gulp-clean-css'),
  sourcemaps = require('gulp-sourcemaps'),
  rename = require("gulp-rename");
  
  gulp.task('sass', function () {
      return gulp.src(src.sass)
          .pipe(sourcemaps.init())
          .pipe(sass())
          .pipe(prefixer())
          .pipe(gulp.dest(src.css))
          .pipe(minifycss())
          .pipe(rename({suffix: '.min'}))
          .pipe(sourcemaps.write('/maps'))
          .pipe(gulp.dest(src.css))
          .pipe(connect.reload());
  });
  </code></pre>
  
  <p>..locally running any command like <code>gulp sass</code> would produce:</p>
  
  <pre><code>Error: Cannot find module ' gulp-sass'
      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 Object.&lt;anonymous&gt; (/Users/myusername/sites/projectname/gulpfile.js:25:12)
      at Module._compile (module.js:570:32)
      at Object.Module._extensions..js (module.js:579:10)
      at Module.load (module.js:487:32)
      at tryModuleLoad (module.js:446:12)
      at Function.Module._load (module.js:438:3)
  </code></pre>
  
  <p>I've removed the node_modules, removed the dependancies in package.json, reinstalled each local module</p>