1

I am trying to install socket.io module on my BeagleBone Black. But i am getting the following error:-

root@beaglebone:~# npm install -g socket.io


> utf-8-validate@1.2.1 install /usr/lib/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate
> node-gyp rebuild

 WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.10.40"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate/.node-gyp"
Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 3.8.13-bone70
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v0.10.40
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok 
npm WARN optional dep failed, continuing utf-8-validate@1.2.1

> bufferutil@1.2.1 install /usr/lib/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.10.40"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil/.node-gyp"

I am using the default os shipped with the BBB. I have updated and upgraded the BBB.

I execute the following commands:-
1] ntpdate -b -s -u pool.ntp.org
2] npm config set strict-ssl false
3] npm install -g socket.io

Help me out with this one please!!

Regards, Abhishek.

Addition:- I tried to uninstall and reinstall nodejs, but in the process Cloud9 also got uninstalled. Now, even nodejs is giving errors on installation. Furthermore, my BBB gets connected through ssh, but "https://192.168.7.2/" does not open in the browser.

Stuck badly!!

Sandrocottus
  • 521
  • 3
  • 8
  • 31
  • Have a look at [can't install any node module from the npm](http://stackoverflow.com/questions/12913141/message-failed-to-fetch-from-registry-while-trying-to-install-any-module) and [NPM - Can't install socket.IO](http://stackoverflow.com/questions/16469086/npm-cant-install-socket-io) May be these will solve your problem. – S.I.J Dec 03 '15 at 18:16
  • 1
    None of this seems to work. I will flash the BBB with latest image and try again. – Sandrocottus Dec 05 '15 at 11:21

2 Answers2

0

I had to flash my BBB with latest image, and install the npm. Then i was able to install sockets.io correctly and execute related projects.

I followed the following 2 links to do the same:-

For flashing BBB:- https://learn.adafruit.com/webide/installation-on-beaglebone

For installing npm:- https://www.npmjs.com/package/bonescript

Sandrocottus
  • 521
  • 3
  • 8
  • 31
0

For installing socket.io https://github.com/lgxlogic/BoneScript-SocketIO

This got my BBB working for socket related projects.

Regards, Abhishek.

Sandrocottus
  • 521
  • 3
  • 8
  • 31