Installing Node.js on Raspberry Pi

Posted on 20th January 2017

Raspbian Jessie for newer models of Raspberry Pi comes with a preinstalled version of node-RED, a visual tool for connecting hardware devices, services and APIs. If you are running Raspbian Jessie, you might have an older version of Node.js that came with node-RED. You can check if node is pre-installed on your Raspbian image by running the command node -v

pi@raspberrypi:~ $ node -v

If you don't have Node.js pre-installed you can install the latest version from nodesource repository.

At the time of writing this article the latest is 7.x, but we can go for the more stable 6.x

curl -sL | sudo -E bash -sudo apt-get install -y nodejs

If you do have node-RED and want to update your Node.js version, you can run the command update-nodejs-and-nodered. Refer node-RED documentation.

If you don't want node-RED, you can uninstall it and perform a fresh Node.js installation from the nodesource repository.

Post a comment


Nothing the first to share wisdom.