Omega2+ node.js modules



  • Hey everyone! I'm excited to get my Omega2 up and running for an IoT project I'm working on. I'd like to use Node.js as my primary runtime because JS is where I'm most comfortable.

    I've got Node & NPM installed, but node modules require C/C++ code to be compiled on the target platform. I've gone ahead and installed node-gyp and gcc as dependencies of this process. What I'm running into now (with node-microtime and others) is the following:

    > microtime@2.1.2 install /app/src/js/node_modules/rpi-ws2801/node_modules/microtime
    > node-gyp rebuild
    
    make: Entering directory '/app/src/js/node_modules/rpi-ws2801/node_modules/microtime/build'
      CXX(target) Release/obj.target/microtime/src/microtime.o
      SOLINK_MODULE(target) Release/obj.target/microtime.node
    /usr/bin/ld: cannot find -lpthread
    collect2: error: ld returned 1 exit status
    make: *** [microtime.target.mk:114: Release/obj.target/microtime.node] Error 1
    make: Leaving directory '/app/src/js/node_modules/rpi-ws2801/node_modules/microtime/build'
    

    I can't seem to find ANY dev versions of libraries on opkg, but do find that I have libpthread already installed on my system. Is there a way to add dev-libs to opkg, or another way to compile these modules, on-device?



  • @patrick-gunderson I am trying to build a simple IoT project - and got stuck because the SerialPort module does NOT have a MIPS version. I am trying to get setup to attempt building it BUT it won't compile/build - get to the same stage as you are. Any instructions on how to get gcc / node-gyp installed on the Omega2?



Looks like your connection to Community was lost, please wait while we try to reconnect.