title: Error trying to install npm for Node.js
body: <p>I'm having a stab at learning Node.js and I'm having a few issues when installing NPM (Node Package Manager). I'm pretty sure it's either a permissions thing or folder thing... please note that I've just purchased a Mac (I've used Windows all my life) and I'm pretty unfamiliar with the Mac terminal.</p>
  
  <p>Okay, I went to use the one line install for NPM: <code>curl <a href="http://npmjs.org/install.sh">http://npmjs.org/install.sh</a> | sh</code> and I got an error...</p>
  
  <pre><code>All clean!
  ! [ -d .git ] || git submodule update --init --recursive
  node cli.js rm npm -g -f
  node cli.js install -g -f
  npm ERR! Could not create /usr/local/lib/node_modules/___npm.npm
  npm ERR! error installing npm@1.0.94 Error: EACCESS, Undefined error: 0 '/usr/local/lib/node_modules'
  npm ERR! Error: EACCESS, Undefined error: 0 '/usr/local/lib/node_modules'
  npm ERR! Report this *entire* log at:
  npm ERR!     &lt;http://github.com/isaacs/npm/issues&gt;
  npm ERR! or email it to:
  npm ERR!     &lt;npm-@googlegroups.com&gt;
  npm ERR! 
  npm ERR! System Darwin 11.0.0
  npm ERR! command "node" "/private/var/folders/z2/f05c8hx105g79drh6r7hr01w0000gn/T/npm.1219/package/cli.js" "install" "-g" "-f"
  npm ERR! cwd /private/var/folders/z2/f05c8hx105g79drh6r7hr01w0000gn/T/npm.1219/package
  npm ERR! node -v v0.5.9-pre
  npm ERR! npm -v 1.0.94
  npm ERR! path /usr/local/lib/node_modules
  npm ERR! code EACCESS
  npm ERR! 
  npm ERR! Additional logging details can be found in:
  npm ERR!     /private/var/folders/z2/f05c8hx105g79drh6r7hr01w0000gn/T/npm.1219/package/npm-debug.log
  npm not ok
  make: *** [install] Error 1
  npm ERR! Could not create /usr/local/lib/node_modules/___npm.npm
  npm ERR! error installing npm@1.0.94 Error: EACCESS, Undefined error: 0 '/usr/local/lib/node_modules'
  npm ERR! Error: EACCESS, Undefined error: 0 '/usr/local/lib/node_modules'
  npm ERR! Report this *entire* log at:
  npm ERR!     &lt;http://github.com/isaacs/npm/issues&gt;
  npm ERR! or email it to:
  npm ERR!     &lt;npm-@googlegroups.com&gt;
  npm ERR! 
  npm ERR! System Darwin 11.0.0
  npm ERR! command "/usr/local/bin/node" "/private/var/folders/z2/f05c8hx105g79drh6r7hr01w0000gn/T/npm.1219/package/cli.js" "install" "-gf"
  npm ERR! cwd /private/var/folders/z2/f05c8hx105g79drh6r7hr01w0000gn/T/npm.1219/package
  npm ERR! node -v v0.5.9-pre
  npm ERR! npm -v 1.0.94
  npm ERR! path /usr/local/lib/node_modules
  npm ERR! code EACCESS
  npm ERR! 
  npm ERR! Additional logging details can be found in:
  npm ERR!     /private/var/folders/z2/f05c8hx105g79drh6r7hr01w0000gn/T/npm.1219/package/npm-debug.log
  npm not ok
  It failed
  </code></pre>
  
  <p>there's obviously a folder issue here, perhaps I'm installing in the wrong place, my node folder is at Users/Mike/node, when I try and find out my node path variable using NODE_PATH I get the following error:</p>
  
  <pre><code>Michaels-MacBook-Pro:~ Mike$ node node/NODE_PATH  
  
  node.js:203
          throw e; // process.nextTick error, or 'error' event on first tick
                ^
  Error: Cannot find module '/Users/Mike/node/NODE_PATH'
      at Function._resolveFilename (module.js:334:11)
      at Function._load (module.js:279:25)
      at Array.&lt;anonymous&gt; (module.js:470:10)
      at EventEmitter._tickCallback (node.js:195:26)
  </code></pre>
  
  <p>Can someone please tell me what I'm doing wrong? Do I need to add the node path like such:</p>
  
  <pre><code>$ export PATH=/path/to/node/0.n.y/bin:${PATH}
  $ curl http://npmjs.org/install.sh | sh
  </code></pre>
  
  <p>Or am I confusing myself?</p>