NodeJS on Raspberry Pi - cjus/hydra-cluster GitHub Wiki

On a Raspberry Pi 3 you can install NodeJS in a straightforward manner:

$ curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
$ sudo apt-get install -y nodejs

You can also install from the node site:

$ wget https://nodejs.org/dist/v6.6.0/node-v6.6.0-linux-armv7l.tar.xz
$ tar -xvf node-v6.6.0-linux-armv7l.tar.xz
$ cd node-v6.6.0-linux-armv7l/bin
$ sudo cp * /usr/bin

Installing Node on a Raspberry Pi Zero

The Pi Zero features an ArmV6 which means we can't use the NodeSource distribution we used for the Pi 3's.

See Setting up a Pi Zero for step-by-step instructions.