Install Latest Node JS on Raspberry Pi All Models

4

As of the time of this writing, the version of Node JS that comes with Raspbian is v 0.10.29. It has some bugs and is an old version considering the latest stable version is v6.x.x and the latest LTS version is v4.4.4 LTS (as of the time of this writing). Here is how you install the latest LTS version of Node JS on All versions of Raspberry Pi. First, we need to remove the old Node JS.

Type the following into your Raspberry pi terminal to remove old Node JS.

Great, now all traces of the old Node JS is gone. Now we get to pick our version.

For v4.4.3 LTS (recommended)

For v 5.x.x

** Update 5/24/2016 **
For v 6.x.x

That is it. You can make sure it worked by entering the following.

It should output whatever version you installed. You also now have NPM, which strangly was not packaged with Raspbian with Node. You can check it’s version as well.

Enjoy!

** Update 5/24/2016 **

I noticed that this method did not work on a raspberry pi zero. It should, but doesnt for some reason. If you are having issues uninstall nodejs and npm installed via apt-get using the first set of commands. Then use the following for 4.4.5.

You can change the version number in the commands for whatever version you want.

Share.

About Author

I love to tinker, code, and create electronics. I primarily focus on Raspberry Pi (and other linux SBCs) and Arduino (and other microcontrollers that run on the Arduino platform).

  • Shu Kin

    Thank you! very useful tutorial:)

  • tRASTE

    umm… so what about nodered? its just to be uninstalled and thats it? or is it reinstalled by the node.js installer automagically somehow?

  • Leonardo Vegas

    thanks so much!

  • Thank you much! I couldn’t find anywhere to install a recent node distribution on my Raspberry Pi 1 and this did the trick.