title: setting up NODE_PATH
body: <p>I installed <code>nvm</code>, and used that to upgrade <code>node</code>: <code>nvm install 4.2.1</code>.
  I updated <code>.bashrc</code> to export <code>NODE_PATH=$HOME/.nvm/versions/node/v4.2.1/lib/node_modules</code>.</p>
  
  <p>My immediate goal is to install hubot, following <a href="https://github.com/slackhq/hubot-slack" rel="nofollow">these instructions</a>. The install command succeeds: <code>npm install -g hubot coffee-script yo generator-hubot</code></p>
  
  <p>However the installed commands can't find their libraries: </p>
  
  <pre><code>$ yo hubot
  module.js:339
      throw err;
      ^
  
  Error: Cannot find module 'os-tmpdir'
      at Function.Module._resolveFilename (module.js:337:15)
      at Function.Module._load (module.js:287:25)
      at Module.require (module.js:366:17)
      at require (module.js:385:17)
      at Object.&lt;anonymous&gt; (/home/john/.nvm/versions/node/v4.2.1/lib/node_modules/yo/node_modules/configstore/node_modules/osenv/osenv.js:4:16)
      at Module._compile (module.js:435:26)
      at Object.Module._extensions..js (module.js:442:10)
      at Module.load (module.js:356:32)
      at Function.Module._load (module.js:311:12)
      at Module.require (module.js:366:17)
  </code></pre>
  
  <p>When I install each missing lib, it's found. So I end up with this situation:</p>
  
  <pre><code># We already have two copies of os-tmpdir, why isn't it found??
  $ find /home/john/.nvm/ -name "*tmpdir*"
  /home/john/.nvm/versions/node/v4.2.1/lib/node_modules/generator-hubot/node_modules/os-tmpdir
  /home/john/.nvm/versions/node/v4.2.1/lib/node_modules/npm/node_modules/osenv/node_modules/os-tmpdir
  
  # Just install it again:
  $ npm install -g os-tmpdir
  
  # Now we have three copies! But it's being found.
  $ find /home/john/.nvm/ -name "*os-tmpdir*"
  /home/john/.nvm/versions/node/v4.2.1/lib/node_modules/generator-hubot/node_modules/os-tmpdir
  /home/john/.nvm/versions/node/v4.2.1/lib/node_modules/npm/node_modules/osenv/node_modules/os-tmpdir
  /home/john/.nvm/versions/node/v4.2.1/lib/node_modules/os-tmpdir
  </code></pre>
  
  <p>Why isn't there a single <code>node_modules</code> for node modules? Is there supposed to be <code>node_modules</code> nested under <code>node_modules</code> nested under <code>node_modules</code> ... ?</p>