Menu

Installing Socket.u

Help
msemple
2015-05-28
2015-05-28
  • msemple

    msemple - 2015-05-28

    All the installing was working until I tryed to install socket but
    I have been trying to install the socket.io v0.9 all afternoon with no success.
    When I Try

    sudo npm -g install socket.io@0.9.x
    

    All I get back after about 10 minutes

    > ws@0.4.32 install /usr/local/lib/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
    > (node-gyp rebuild 2> builderror.log) || (exit 0)
    make: Entering directory '/usr/local/lib/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'
      CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
      SOLINK_MODULE(target) Release/obj.target/bufferutil.node
      SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
      COPY Release/bufferutil.node
      CXX(target) Release/obj.target/validation/src/validation.o
      SOLINK_MODULE(target) Release/obj.target/validation.node
      SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
      COPY Release/validation.node
    make: Leaving directory '/usr/local/lib/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'
    socket.io@0.9.17 /usr/local/lib/node_modules/socket.io
    ├── base64id@0.1.0
    ├── policyfile@0.0.4
    ├── redis@0.7.3
    └── socket.io-client@0.9.16 (xmlhttprequest@1.4.2, uglify-js@1.2.5, active-x-obfuscator@0.0.1, ws@0.4.32)
    

    I am using raspberry pi B v1 ARMv6 with raspbian Debian fully updated
    I have instaled node-gyp and reinstalled npm and tried to reinstall socket.
    in /var/log/nodejs-socket-io.log

    ...
    
        Error: Cannot find module 'socket.io'
            at Function.Module._resolveFilename (module.js:336:15)
            at Function.Module._load (module.js:278:25)
            at Module.require (module.js:365:17)
            at require (module.js:384:17)
            at Object.<anonymous> (/usr/share/nginx/html/cakephp-2.5.4/rd_cake/Setup/Node.js/Logfile.node.js:5:15)
            at Module._compile (module.js:460:26)
            at Object.Module._extensions..js (module.js:478:10)
            at Module.load (module.js:355:32)
            at Function.Module._load (module.js:310:12)
            at Function.Module.runMain (module.js:501:10)
        error: Forever detected script exited with code: 1
        error: Script restart attempt #719
    

    I also noticed krulleke had similar problem https://sourceforge.net/p/radiusdesk/discussion/general/thread/fe4467b7/#297a

    Is there a way I can build it manually?
    Do I have to install socket.io for it to work properly or does it only serve up the log?
    If anyone could help it would be greatly appreciated

     
  • msemple

    msemple - 2015-05-28

    Finally cracked it,
    I think it was a problem with installing socket.io globally.

    What I did:

    cd /usr/share/nginx/html/cake2/rd_cake/Setup/Node.js
    sudo npm install socket.io@0.9.x
    sudo npm install mysql
    

    Will it be a problem not installing it globally, does anything else require socket or mysql?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.