1 2 Previous Next 15 Replies Latest reply on Sep 2, 2015 4:03 PM by xbolshe

    How to update node.js to 0.12?

    hermarw

      Hello,

       

      I am using a Galileo generation 1. I have written some node.js code that requires v0.12, not the v0.10.35 that is included. So far I have not had any luck in updating node.js. Here are some things I tried:

       

      1.sudo npm cache clean -f

      sudo npm install -g n

      sudo n stable

       

      This did not work. The last command says:

      cp: cannot stat '/usr/local/n/versions/node//bin': No such file or directory

      cp: cannot stat '/usr/local/n/versions/node//lib': No such file or directory

      cp: cannot stat '/usr/local/n/versions/node//share': No such file or directory

        • 1. Re: How to update node.js to 0.12?
          Intel_Alvarado

          Hi,

           

          Why don’t you try installing it from source? You can use wget http://nodejs.org/dist/v0.12.2/node-v0.12.2.tar.gz to download it and tar xvf to uncompress it. Then, just follow the instructions on the README file to install. Make sure you have enough space on your SD when doing this process. Let me know if this works.

           

          Sergio

          • 2. Re: How to update node.js to 0.12?
            dpc27

            Hello,

             

            I am doing this connected to Intel Galileo via ssh with putty from Windows.

            After uncompressing it, I'd just have to do this:

             

            ./configure

            make

             

            and then fails. I don't know if it is because there is no more space, since 1º partition is only 40MB or so. Should I mix both partitions?

             

            root@galileo:~/node-v0.12.7# make

            make -C out BUILDTYPE=Release V=1

            make[1]: Entering directory '/home/root/node-v0.12.7/out'

              LD_LIBRARY_PATH=/home/root/node-v0.12.7/out/Release/lib.host:/home/root/node-v0.12.7/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps/v8/tools/gyp; mkdir -p /home/root/node-v0.12.7/out/Release/obj.target/v8_snapshot/geni; "/home/root/node-v0.12.7/out/Release/mksnapshot" --log-snapshot-positions --logfile "/home/root/node-v0.12.7/out/Release/obj.target/v8_snapshot/geni/snapshot.log" "/home/root/node-v0.12.7/out/Release/obj.target/v8_snapshot/geni/snapshot.cc"

             

            #

            # Fatal error in ../deps/v8/src/ia32/assembler-ia32.cc, line 54

            # CHECK(cpu.has_sse2()) failed

            #

             

            ==== C stack trace ===============================

             

            1: V8_Fatal

            2: v8::internal::CpuFeatures::ProbeImpl(bool)

            3: main

            4: __libc_start_main

            5: ??

            /bin/sh: line 1:   261 Aborted                 "/home/root/node-v0.12.7/out/Release/mksnapshot" --log-snapshot-positions --logfile "/home/root/node-v0.12.7/out/Release/obj.target/v8_snapshot/geni/snapshot.log" "/home/root/node-v0.12.7/out/Release/obj.target/v8_snapshot/geni/snapshot.cc"

            deps/v8/tools/gyp/v8_snapshot.target.mk:13: recipe for target '/home/root/node-v0.12.7/out/Release/obj.target/v8_snapshot/geni/snapshot.cc' failed

            make[1]: *** [/home/root/node-v0.12.7/out/Release/obj.target/v8_snapshot/geni/snapshot.cc] Error 134

            make[1]: Leaving directory '/home/root/node-v0.12.7/out'

            Makefile:45: recipe for target 'node' failed

            make: *** [node] Error 2

            • 3. Re: How to update node.js to 0.12?
              YannickGouez

              the busybox version of tar does not support the --strip-components parameter needed by n to uncompress the sources. I tried to compile tar but it's way more complicated than compiling node yourself.

              • 4. Re: How to update node.js to 0.12?
                Intel_Alvarado

                Hi,

                 

                You can check how much space available you have left with the command df –h.

                Do you still have issues with node.js installation?

                 

                Sergio

                • 5. Re: How to update node.js to 0.12?
                  YannickGouez

                  I had no issues with installing node.js.

                  maybe you meant to answer to dpc27 ?

                  • 6. Re: How to update node.js to 0.12?
                    dpc27

                    Never mind.

                     

                    I was able to install the version 11.5 after compiling it. It takes around 7h, and I had to try several versions because of the same error, so is a totally waste of time.

                    The other ways to update it, may not have worked because I didn't have had set the date and time of galileo, and npm for example uses the date to check whether to update or not. I found this by accident looking for another error I had, so it would be nice to advise this on any "updating nodejs thread".

                     

                    Anyway, I couldn't use the new versions of linux and IDE, since it provoke some errors on my project. I must say that is great to have access to the SD on Galileo like a normal SD, but it is pointless if linux makes 2 partitions and you only get access to the smallest one, which is 40MB.

                     

                    I have to say too, that the problem regarding the Ethernet library about saving the remote IP and port, is still present. I notified this in the forum long time ago.

                    • 7. Re: How to update node.js to 0.12?
                      Mouhyemen

                      Hello dpc27,

                       

                      I tried installing how @Intel_Alvarado had suggested.

                       

                      I got the tar file from wget http://nodejs.org/dist/v0.12.2/node-v0.12.2.tar.gz . After un-tarring, I did:

                      ./configure

                      make

                      make install

                       

                      After about 2-3 hours, the process ended. But I am not sure what exactly happened. Did it install node v0.12.2 for me? When I check the version, I am still getting:

                      v0.10.40

                       

                      Can you fill me in ?

                      • 8. Re: How to update node.js to 0.12?
                        dpc27

                        It didn't. Didn't you get any log error messages?
                        Last versions doesn't work on Galileo since they come with a component that is not supported (I don't remember which one exactly).

                        I was able to install the version 11.5.

                        • 9. Re: How to update node.js to 0.12?
                          Mouhyemen

                          I was able to get it done on my intel edison. I am opened a discussion laying out all the steps - I am not sure if it will work for you or not.

                           

                          But here's the link to it: https://communities.intel.com/thread/80570?sr=stream

                           

                          It took me about 2-3 hours to compile.

                          • 10. Re: How to update node.js to 0.12?
                            dpc27

                            Well if it's on Edison, then I don't know anymore.

                            But if you try to get the version and it does not say 12.2, then it didn't work.

                            • 11. Re: How to update node.js to 0.12?
                              xbolshe

                              Hi ,

                               

                              actually the last NodeJS version v0.12.7 may work on Galileo board.

                              nodejs_0.12.7.jpg

                               

                              BR,

                              xbolshe

                              • 12. Re: How to update node.js to 0.12?
                                dpc27

                                Which version of linux and Galileo are you using? Because on my device, Galileo Gen 1, says "clanton", not galileo.

                                • 13. Re: How to update node.js to 0.12?
                                  xbolshe

                                  Board: Galileo Gen1

                                  nodejs_linux_ver.jpg

                                   

                                  BR,

                                  xbolshe

                                  • 14. Re: How to update node.js to 0.12?
                                    dpc27

                                    Yes, that's why. You are using the IoT version.

                                     

                                    I guess you can access your SD card like a normal device from your PC, which have a very small partition.

                                     

                                    If not, let me know what did you do, since that partition wasn't enough for my proyect.

                                    1 2 Previous Next