title: Gulp error (module not found)
body: <p>I have installed npm locally according to an article (I don't remember the URL). So that my npm packages are in <code>~/.npm-packages/</code>. So gulp is in <code>~/.npm-packages/bin/gulp</code> and this is a link: <code>gulp -&gt; ../lib/node_modules/gulp/bin/gulp.js
  </code></p>
  
  <p>When I run <code>which gulp</code> I got <code>/home/victor/.npm-packages/bin/gulp
  </code></p>
  
  <p>When I go to the bin directory and run gulp like <code>./gulp.js -v</code> I can see it works. However, when I run gulp globally I got such error:</p>
  
  <pre><code>module.js:338
      throw err;
            ^
  Error: Cannot find module '/usr/lib/node_modules/gulp/node_modules/v8flags/3.28.73.flags.json'
      at Function.Module._resolveFilename (module.js:336:15)
      at Function.Module._load (module.js:278:25)
      at Module.require (module.js:365:17)
      at require (module.js:384:17)
      at Object.&lt;anonymous&gt; (/usr/lib/node_modules/gulp/bin/gulp.js:25:22)
      at Module._compile (module.js:460:26)
      at Object.Module._extensions..js (module.js:478:10)
      at Module.load (module.js:355:32)
      at Function.Module._load (module.js:310:12)
      at Function.Module.runMain (module.js:501:10)
  </code></pre>
  
  <p>So gulp is trying to find modules in /usr/lib, but why? Why not in my home directory? I have all these modules in <code>~/.npm-packages/lib/node_modules/gulp/node_modules</code></p>
  
  <p>I'm absolutely confused and can't get gulp working. I've tried to reinstall it with the same effect.</p>