title: Help requiring a npm module in node.js
body: <p>I feel like I'm missing some very basic here...</p>
  
  <p>So I install a npm library with <code>npm install somelib</code>.  And from what I have read I should then be able to simply do a</p>
  
  <pre><code>var somelib = require('somelib');
  </code></pre>
  
  <p>But it fails to find anything.  I do have a <code>node_modules</code> directory at the root of my app, but it doesn't seem to pick it up.</p>
  
  <p>I tried <code>require.paths.push('node_modules')</code> but it doesn't help.  The only thing that seems to work is this:</p>
  
  <pre><code>require.paths.unshift('.');
  var somelib = require('node_modules/somelib/lib/somelib');
  </code></pre>
  
  <p>Which makes me feel like this is far more work than I actually need to do to load a npm library.  What am I doing wrong here?  I thought that installing modules in the app meant I didnt have to futz with environment variables or paths much?</p>