title: Node.js Error: Cannot find module 'request'
body: <p>Ok so this is a common error and I HAVE read this
  <a href="https://stackoverflow.com/questions/16482600/node-js-cannot-find-module-request">node.js: cannot find module &#39;request&#39;</a></p>
  
  <p>The request module IS installed in my node_modules. My complete node app is</p>
  
  <pre><code>var r = require("request");
  
  
  var s = r('http://www.foo.com/');
  
  
  s.on('data',function(chunk){
  
      console.log("&gt;&gt;&gt;Data&gt;&gt;&gt; "+chunk);
  });
  
  
  s.on('end', function(){
      console.log("&gt;&gt;&gt;Done!");
  })
  </code></pre>
  
  <p>I run my app by simply calling </p>
  
  <pre><code>node app
  </code></pre>
  
  <p>But I keep getting the same error</p>
  
  <p>What gives?</p>
  
  <p>My directory structure is</p>
  
  <pre><code>app.js
  node_modules
      request
          node_modules
              bl
              combined-stream
              form-data
              hawk
              mime-types
              tough-cookie
  </code></pre>
  
  <p>The complete error trace is</p>
  
  <pre><code>module.js:340
      throw err;
            ^
  Error: Cannot find module 'request'
      at Function.Module._resolveFilename (module.js:338:15)
      at Function.Module._load (module.js:280:25)
      at Module.require (module.js:362:17)
      at require (module.js:378:17)
      at Object.&lt;anonymous&gt; (/Users/foo/Documents/.../app.js:1:71)
      at Module._compile (module.js:449:26)
      at Object.Module._extensions..js (module.js:467:10)
      at Module.load (module.js:356:32)
      at Function.Module._load (module.js:312:12)
      at Module.runMain (module.js:492:10)
  </code></pre>