NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Nodejs on the cRio?

and... unfortunately, this is what I get when I point opkg at the 2015 release feeds (http://download.ni.com/ni-linux-rt/feeds/2015/arm/ipk/cortexa9-vfpv3/).

Collected errors:

* opkg_install_cmd: Cannot install package nodejs4.

admin@cRIO-9068-LOANER:~# opkg list | grep nodejs4

Package nodejs4-dbg version 0.4.12-r0.7 has no valid architecture, ignoring.

Package nodejs4-dev version 0.4.12-r0.7 has no valid architecture, ignoring.

Package nodejs4-doc version 0.4.12-r0.7 has no valid architecture, ignoring.

Package nodejs4 version 0.4.12-r0.7 has no valid architecture, ignoring.

0 Kudos
Message 11 of 17
(1,125 Views)

You need to edit your /etc/opkg/arch.conf to include the new architecture (which is just a slight optimization to what was released in 2014)

/etc/opkg/arch.conf:

...

//Towards the bottom, at a level below armv7a-vfpv3, put

arch cortexa9-vfpv3 ##

// e.g. if the entry for armv7a-vfpv3 is

arch armv7a-vfpv3 66

// add

arch cortexa9-vfpv3 65

// this will limit the number of updated packages


0 Kudos
Message 12 of 17
(1,125 Views)

Once I updated the firmware to the Feb 2016 release, viola, there was nodejs4. Now for my follow up question, why didn't it come with npm, node's package manager?

0 Kudos
Message 13 of 17
(1,125 Views)

Probably since it's too old. According to the Wikipedia article, npm didn't come packaged with nodejs until 0.6.3. The version in the repo is 0.4.x.

0 Kudos
Message 14 of 17
(1,125 Views)

I checked by building the other version of nodejs in the nilrt version used for 2015, and indeed, it includes npm (it's version 0.8.18). since I already went through the build, I might as well share it here. I checked, and it seems that all of the dependencies of the newer version are on the repository, so it should just install.

Message 15 of 17
(1,125 Views)

you rock! Thank you Brad.

0 Kudos
Message 16 of 17
(1,125 Views)

No problem. Be sure to post whatever cool project you end up using Nodejs for to this community to help/inspire others.

0 Kudos
Message 17 of 17
(1,125 Views)