zombiebraut
Participant
Post count: 4

Hi Miroof,

thank you for your quick reply :)

I removed my packages and used your sources instead, I now run npm version 1.4.9 and node version v0.10.28

I was now able to do the npm install without warnings. But when I type sudo node main.js I get sudo: node: command not found
and without sudo again the error:

node main.js

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: listen EACCES
    at errnoException (net.js:904:11)
    at Server._listen2 (net.js:1023:19)
    at listen (net.js:1064:10)
    at Server.listen (net.js:1138:5)
    at Object.<anonymous> (/home/pi/node-virtual-gamepads/main.js:54:8)
    at Object.<anonymous> (/home/pi/node-virtual-gamepads/main.js:58:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

Edit:

When trying to execute npm install -g node-gyp I get the following error messages:

npm http GET http://registry.npmjs.org/node-gyp
npm http 304 http://registry.npmjs.org/node-gyp
npm ERR! error rolling back Error: EACCES, unlink '/opt/lib/node_modules/node-gyp'
npm ERR! error rolling back  node-gyp@1.0.3 { [Error: EACCES, unlink '/opt/lib/node_modules/node-gyp']
npm ERR! error rolling back   errno: 3,
npm ERR! error rolling back   code: 'EACCES',
npm ERR! error rolling back   path: '/opt/lib/node_modules/node-gyp' }
npm ERR! Error: EACCES, unlink '/opt/lib/node_modules/node-gyp'
npm ERR!  { [Error: EACCES, unlink '/opt/lib/node_modules/node-gyp']
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/opt/lib/node_modules/node-gyp' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Linux 3.18.7-v7+
npm ERR! command "/opt/bin/node" "/opt/bin/npm" "install" "-g" "node-gyp"
npm ERR! cwd /home/pi/node-virtual-gamepads
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! path /opt/lib/node_modules/node-gyp
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, unlink '/opt/lib/node_modules/node-gyp'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/node-virtual-gamepads/npm-debug.log
npm ERR! not ok code 0

Zombiebraut