title: Getting errors when trying to install socket.io globally
body: <p>I am new to node, npm, socket.io. Found many guides that are fairly useful, but I am encountering some errors which I don't understand the cause, hopefully you can help me out.</p>
  
  <pre><code>npm install socket.io -g
  </code></pre>
  
  <p>returns ...</p>
  
  <pre><code>npm http GET https://registry.npmjs.org/socket.io
  npm http 304 https://registry.npmjs.org/socket.io
  npm ERR! error installing socket.io@0.9.4
  npm ERR! error rolling back socket.io@0.9.4 Error: EACCES, unlink   '/usr/local/lib/node_modules/socket.io/.npmignore'
  npm ERR! Error: EACCES, unlink '/usr/local/lib/node_modules/socket.io/.npmignore'
  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 10.8.0
  npm ERR! command "node" "/usr/local/bin/npm" "install" "socket.io" "-g"
  npm ERR! cwd /Users/Kinglee
  npm ERR! node -v v0.6.14
  npm ERR! npm -v 1.1.0-beta-4
  npm ERR! path /usr/local/lib/node_modules/socket.io/.npmignore
  npm ERR! code EACCES
  npm ERR! message EACCES, unlink '/usr/local/lib/node_modules/socket.io/.npmignore'
  npm ERR! 
  npm ERR! Additional logging details can be found in:
  npm ERR!     /Users/Kinglee/npm-debug.log
  </code></pre>
  
  <p>however when i did <code>npm install socket.io</code>, there was no error, everything was fine. </p>
  
  <p>Sorry forget to add this info here ... </p>
  
  <p>I actually tried <code>sudo npm install socket.io</code> and it installed without error but when i try to <code>cd ~/node_modules</code>, I don't see socket.io, this cause <code>'socket.io not found' error</code> when i try to do <code>require('socket.io')</code> as I follow this tutorial here (<a href="http://blog.koostudios.com/?p=470" rel="nofollow">http://blog.koostudios.com/?p=470</a>)</p>
  
  <p>Kind of confused fellow here :/</p>