title: Node Not Finding Global Module
body: <p>So I realize that this is a fairly generic title and question, but I've scoured through so many answers, but sadly none of them seem to be working for me. I'm hoping with a little more information from myself perhaps someone has a specific answer, or knows exactly which answer to redirect me to.</p>
  
  <p>My problem: when I install node modules globally (e.g. <code>npm install -g nightmare</code>) I'm unable to access them in my project folder. I get the error:</p>
  
  <pre><code>module.js:471
      throw err;
      ^
  
  Error: Cannot find module 'nightmare'
  ...
  </code></pre>
  
  <p>From what I've read so far installing the module locally inside the project folder seems to be the preferred practice (is this true?), but for now during the development phase I'd like to be able to use the modules I have installed globally. I'm newer to node.js so I'm still discovering what the "usual practice" is for these things though. I first installed Node using Homebrew, but being as I had issues with how things were installing and the pathing (which people were saying is common when using Homebrew), I decided to try a clean slate, uninstalling Homebrew, then eventually Node and NPM as well. I reinstalled just Node and NPM via the site, but am still having no luck being able to access my global modules.</p>
  
  <p>I'm pretty confused at this point because I have some node_module files and packages in some random spots, but not where my current global packages are being installed. I'm assuming leftover from a previous installation. That being said I've adjusted my <code>$NODE_PATH</code> several times in hopes that I could access the modules, but no such luck with that.</p>
  
  <p>The current installation spot according to a <code>--verbose</code> install is <code>/Users/&lt;user&gt;/.npm-packages/lib</code>, which I thought was strange being as a lot of the people already answering this question are correcting their paths to things like <code>/usr/local/lib/node_modules</code> which has things in it for me, but not the modules installed. I'm assuming that (because of the 'local' file it's in) this is the local installing... maybe? To be honest I'm pretty confused at this point as far as why everything is installed where it is and why, even with changing the <code>$NODE_PATH</code> I'm unable to access the modules. </p>
  
  <p>If I've missed something or need to include some other output please feel free to ask and prompt for more. I'm not sure what else is needed for more direction.</p>
  
  <p>Thank you in advance!</p>