title: Node,js doesn´t find any modules
body: <p>I am trying to do one of the node-horseman examples, but I am finding with a problem. The example I am trying to follow is this:   </p>
  
  <pre><code>var Horseman = require('node-horseman');
  var horseman = new Horseman();
  
  var numLinks = horseman
    .open('http://www.google.com')
    .type('input[name="q"]', 'github')
    .click("button:contains('Google Search')")
    .waitForNextPage()
    .count("li.g");
  
  console.log("Number of links: " + numLinks);
  
  horseman.close();
  </code></pre>
  
  <p>And the errors it throws when I make phantomjs example.js are these:</p>
  
  <pre><code>Error: Cannot find module 'http'
  
    phantomjs://bootstrap.js:299 in require
    phantomjs://bootstrap.js:263 in require
    :3
  Error: Cannot find module 'tty'
  
    phantomjs://bootstrap.js:299 in require
    phantomjs://bootstrap.js:263 in require
    :6
  TypeError: Object is not a constructor (evaluating 'require('debug')('horseman')')
  
    :5
  TypeError: Object is not a constructor (evaluating 'new Horseman()')
  
    phant.js:2 in global code
  </code></pre>
  
  <p>I try to install http locally using npm install http, but after this, there is only a package.json on example/node_modules/http, and if I use npm install in this location, it throws three warnings:</p>
  
  <ul>
  <li>it is too the name of a core module</li>
  <li>no description</li>
  <li>no repository field</li>
  </ul>
  
  <p>About tty, making a local installation it throws a 404 error.</p>
  
  <p>I try this solution (include npm folder on the path) <a href="https://stackoverflow.com/questions/21047030/nodejs-cannot-find-module">Nodejs Cannot find module</a> but it didn´t work.</p>
  
  <p>Any suggestion??</p>
  
  <p>Thanks.</p>
  
  <hr>
  
  <p><strong>EDIT</strong>
  <em>NOT SOLUTION</em>  </p>
  
  <p>I reinstall node (now my version is node 0.12.3, npm 2.9.1, and phantomjs 1.9.8), when I try this simple example from the nodejs web:</p>
  
  <pre><code>var http = require('http');
  http.createServer(function (req, res) {
    res.writeHead(200, {'Content-Type': 'text/plain'});
    res.end('Hello World\n');
  }).listen(1337, '127.0.0.1');
  console.log('Server running at http://127.0.0.1:1337/');
  </code></pre>
  
  <p>And if I run "node example.js" it works, but if I do "phantomjs example.js" the problem persists "Cannot find module http".</p>
  
  <p>I tried install phantomjs via npm ("npm install -g phantomjs") and via downloading the zip on their web, unzipping and adding to the PATH the route to unzipped folder.</p>
  
  <p>One more data (maybe could be a help) my SO is Windows 8.1.</p>
  
  <p><strong>RE-EDIT</strong></p>
  
  <p>I am watching that on the folder where I have installed node, the only folder on node_modules is npm, is it right?? And on C:\Users\Eloy\AppData\Roaming I have two npm folders, one of them is npm-cache and the other one simply npm. The node_modules of this last one doesn´t contain the http module, the npm-cache has a lot of modules and http incluiding... is it important??</p>
  
  <p>Thanks.</p>