Install Node.js on Raspberry Pi

Recommended Method

Use these scripts made by
https://github.com/sdesalas/node-pi-zero

Using Direct Download and Auto Start on Boot
http://weworkweplay.com/play/raspberry-pi-nodejs/

 

Manual Method

*Not recommended due to inability to upgrade version easily.

At the time of this post the latest version that offers a binary tarbal for ARMv6 hardware is v6.11.3.

https://nodejs.org/dist/v6.11.3/node-v6.11.3-linux-armv6l.tar.gz

Alternate versions that my support AMRv6 hardware will be available here: https://nodejs.org/en/download/releases/

Steps to get it this version installed

wget https://nodejs.org/dist/v6.11.3/node-v6.11.3-linux-armv6l.tar.gz
tar -xvf node-v6.11.3-linux-armv6l.tar.gz 
cd node-v6.11.3-linux-armv6l/
sudo cp -R * /usr/local/
command node -v
v6.11.3

 

Notes:

Node.js downloads from the version repository
https://nodejs.org/en/download/releases/

https://nodejs.org/dist/

Using package manager you will get an error as displayed below
https://nodejs.org/en/download/package-manager/

## You appear to be running on ARMv6 hardware. Unfortunately this is not currently supported by the NodeSource Linux distributions. Please use the ‘linux-armv6l’ binary tarballs available directly from nodejs.org for Node.js v4 and later.

Using a manual method
https://blog.wia.io/installing-node-js-v4-0-0-on-a-raspberry-pi