3 Replies Latest reply on Jul 26, 2016 5:45 PM by neuberfran

    Installing latest or newer Node.js versions on Intel Edison


      I tried installing the newer versions of Node.JS on Intel Edison and hit a few bumps along the way. So I thought it would be helpful to put the steps down here for anybody looking for how to get this done.


      1. Remove existing nodejs and its dependents:

      opkg remove nodejs --force-depends


      2. Create a temporary directory to download your nodejs source file into:

      mkdir node_temp_dir

      cd node_temp_dir


      3. Download your desired nodejs source file:

      wget http://nodejs.org/dist/v0.12.2/node-v0.12.2.tar.gz (note: v0.12.2 will be replaced by your version of nodejs)

      tar -xvf node-v0.12.2

      cd node-v0.12.2


      4. Configure & install



      make install


      5. That's all!

      That should be all. Don't forget to check the version of your node by node -v and the output should match your source file's version.

        • 1. Re: Installing latest or newer Node.js versions on Intel Edison

          This works great however, when I try to npm install mraa, it now fails. Any thoughts?



          mraa.target.mk:119: recipe for target 'Release/obj.target/mraa/src/mraajsJAVASCRIPT_wrap.o' failed

          make: *** [Release/obj.target/mraa/src/mraajsJAVASCRIPT_wrap.o] Error 1

          make: Leaving directory '/home/root/test/node_modules/mraa/build'

          gyp ERR! build error

          gyp ERR! stack Error: `make` failed with exit code: 2

          gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)

          gyp ERR! stack     at ChildProcess.emit (events.js:110:17)

          gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)

          gyp ERR! System Linux 3.10.17-poky-edison+

          gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

          gyp ERR! cwd /home/root/test/node_modules/mraa

          gyp ERR! node -v v0.12.7

          gyp ERR! node-gyp -v v2.0.1

          gyp ERR! not ok

          npm ERR! Linux 3.10.17-poky-edison+

          npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "mraa"

          npm ERR! node v0.12.7

          npm ERR! npm v2.11.3

          npm ERR! code ELIFECYCLE


          npm ERR! mraa@0.8.1 install: `node-gyp rebuild`

          npm ERR! Exit status 1

          npm ERR!

          npm ERR! Failed at the mraa@0.8.1 install script 'node-gyp rebuild'.

          npm ERR! This is most likely a problem with the mraa package,

          npm ERR! not with npm itself.

          • 2. Re: Installing latest or newer Node.js versions on Intel Edison


            I've tried your solution with node v4.2.2, but I did not success.

            These are the commands I've used:

            wget http://nodejs.org/dist/v4.2.2/node-v4.2.2.tar.gz

            tar -xvf node-v4.2.2.tar.gz


            And this is the error message I'm getting:

            root@edison:~/installables/node2/node-v4.2.2# ./configure

            Traceback (most recent call last):

              File "./configure", line 23, in <module>

                import nodedownload

            ImportError: No module named nodedownload


            My edison firmware version is 3.10.17-poky-edison (159).

            I've not installed python myself, so I'm using python 2.7. I do have installed pip manually, and tried to download nodedownload executing pip install nodedownload without success.


            What I should do?


            Thank you!