title: npm fail to install node-hid (faild to install last version of Nodejs)
body: <p>I'm trying to install node-hid on my Raspberry Pi (Raspbian).
  But node-hid need a high version of Nodejs to work ( >= 0.8 ) and my version is only 0.6.19.</p>
  
  <p>So, I've tried to install Nodejs v0.10.26 with nvm... Nvm installed successfully nodejs v0.10.26, but npm still use the old version of Nodejs. How can the v0.10.26 version of Nodejs be used in the entire system ? And how can I install node-hid ?</p>
  
  <p>Thank you for your help</p>
  
  <p>Here is the code I get when i'm trying to install node-hid :</p>
  
  <pre><code>pi@raspberrypi ~ $ sudo npm install -g node-hid
  npm http GET https://registry.npmjs.org/node-hid
  
  npm ERR! Error: failed to fetch from registry: node-hid
  npm ERR!     at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
  npm ERR!     at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
  npm ERR!     at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
  npm ERR!     at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
  npm ERR!     at Request.&lt;anonymous&gt; (/usr/lib/nodejs/request/main.js:212:58)
  npm ERR!     at Request.emit (events.js:88:20)
  npm ERR!     at ClientRequest.&lt;anonymous&gt; (/usr/lib/nodejs/request/main.js:209:10)
  npm ERR!     at ClientRequest.emit (events.js:67:17)
  npm ERR!     at ClientRequest.onError (/usr/lib/nodejs/request/tunnel.js:164:21)
  npm ERR!     at ClientRequest.g (events.js:156:14)
  npm ERR! You may report this log at:
  npm ERR!     &lt;http://bugs.debian.org/npm&gt;
  npm ERR! or use
  npm ERR!     reportbug --attach /home/pi/npm-debug.log npm
  npm ERR! 
  npm ERR! System Linux 3.6.11+
  npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "node-hid"
  npm ERR! cwd /home/pi
  npm ERR! node -v v0.6.19
  npm ERR! npm -v 1.1.4
  npm ERR! message failed to fetch from registry: node-hid
  npm ERR! 
  npm ERR! Additional logging details can be found in:
  npm ERR!     /home/pi/npm-debug.log
  npm not ok
  </code></pre>
  
  <p>And in npm-debug.log : </p>
  
  <pre><code>info it worked if it ends with ok
  verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'install', 'node-hid', '-g' ]
  info using npm@1.1.4
  info using node@v0.6.19
  verbose config file /root/.npmrc
  verbose config file /usr/etc/npmrc
  verbose config file /usr/share/npm/npmrc
  silly exec /usr/bin/nodejs "/usr/share/npm/bin/npm-get-uid-gid.js" "nobody" 1000
  silly spawning [ '/usr/bin/nodejs',
  silly spawning   [ '/usr/share/npm/bin/npm-get-uid-gid.js', 'nobody', 1000 ],
  silly spawning   null ]
  silly output from getuid/gid {"uid":65534,"gid":1000}
  silly output from getuid/gid 
  verbose cache add [ 'node-hid', null ]
  silly cache add: name, spec, args [ undefined, 'node-hid', [ 'node-hid', null ] ]
  verbose parsed url { pathname: 'node-hid', path: 'node-hid', href: 'node-hid' }
  verbose addNamed [ 'node-hid', '' ]
  verbose addNamed [ null, '' ]
  silly name, range, hasData [ 'node-hid', '', false ]
  verbose raw, before any munging node-hid
  verbose url resolving [ 'https://registry.npmjs.org/', './node-hid' ]
  verbose url resolved https://registry.npmjs.org/node-hid
  http GET https://registry.npmjs.org/node-hid
  ERR! Error: failed to fetch from registry: node-hid
  ERR!     at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
  ERR!     at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
  ERR!     at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
  ERR!     at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
  ERR!     at Request.&lt;anonymous&gt; (/usr/lib/nodejs/request/main.js:212:58)
  ERR!     at Request.emit (events.js:88:20)
  ERR!     at ClientRequest.&lt;anonymous&gt; (/usr/lib/nodejs/request/main.js:209:10)
  ERR!     at ClientRequest.emit (events.js:67:17)
  ERR!     at ClientRequest.onError (/usr/lib/nodejs/request/tunnel.js:164:21)
  ERR!     at ClientRequest.g (events.js:156:14)
  ERR! You may report this log at:
  ERR!     &lt;http://bugs.debian.org/npm&gt;
  ERR! or use
  ERR!     reportbug --attach /home/pi/npm-debug.log npm
  ERR! 
  ERR! System Linux 3.10.25+
  ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "node-hid" "-g"
  ERR! cwd /home/pi
  ERR! node -v v0.6.19
  ERR! npm -v 1.1.4
  ERR! message failed to fetch from registry: node-hid
  verbose exit [ 1, true ]
  </code></pre>