How to install latest version of Node.js on Raspberry Pi 3?

Guide to install latest version of Node.js via Node.js version management system

Posted by Amritpal Singh on December 25, 2017

In this tutorial, you will learn to install the latest version of Node.js on your Raspberry Pi 3. The latest image of Raspbian Operating System (as of December 2017) contains an older version of the Node.js application. You can manually update it to the latest version by removing the existing version and re-installing the newest version using "n – Interactively Manage Your Node.js Versions."

Step 1: First remove existing old version from Raspberry Pi

[email protected]:~ $ sudo -i
[email protected]:~# apt-get remove nodered -y
[email protected]:~# apt-get remove nodejs nodejs-legacy -y
[email protected]:~# exit

Step 2: Installing n will automatically install latest stable version of Node.js

curl -L | bash

Step 3: Verify your installation version

[email protected]:~ $ node --version
[email protected]:~ $ npm --version

Step 4: Optional: You can easily switch to different releases

Use or install the latest official release:
[email protected]:~ $ n latest
Use or install the stable official release:
[email protected]:~ $ n stable
Use or install the latest LTS official release:
[email protected]:~ $ n lts

You should now successfully have latest version of Node.js on your Raspberry Pi, if you have any issues please ask question in comments.



copy the line 'curl -L | bash' and got the error mess 'n-install: ERROR: `git` not found, which is required for operation.' What am I doing wrong ?

rafidh hamad

hi , please how to install nodejs v4.7.0 on debeain in raspberry pi3 please you can help me now


Install nodejs on debian using the following method<br/> # Using Debian, as root<br/> curl -sL | bash -<br/> apt-get install -y nodejs<br/>

flash ahmed

n-install: ERROR: Aborting, because n and/or Node.js-related binaries are already in the $PATH: /usr/local/bin/npm Please remove any existing n, Node.js installation, then try again.

Victoria Tegg

Excellent, what a webpage it is! This weblog provides valuable facts to us, keep it up. <a href=""> </a>

Add Comment