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

Guide to install latest version of Node.js via git.io 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 https://git.io/n-install | 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.


11 Comments

leif

copy the line 'curl -L https://git.io/n-install | 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

amrit

Install nodejs on debian using the following method<br/> # Using Debian, as root<br/> curl -sL https://deb.nodesource.com/setup_4.x | 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="https://darknetmarketslink.com"> darknetmarketslink.com </a>

Alisha Ross

Aside from package managers, you can also manually install software either using a .deb file (for Debian based distros like Ubuntu) or by compiling from source (a little more complex, but easy once you get the hang of it). A lot of app sources on Ubuntu just require you to "cd" to the source folder and type "make". Sometimes you need to configure the source by typing "./configure" before you "make" it. For the most part though, most software sources will come with a readme or some form of installation instructions that tell you what you need to do to build it and what dependencies are required to build and run it. Regards <a href="https://www.deepwebsiteslinks.com/a-z-world-market-review/">Ross Alisha</a>

Moses Brodin

Much better video than the old one, still some problems. First: Proton is not an API, it's a compatibility layer (pretty much the same as Wine but with DXVK and some extra fixes included), you are not using the recommended drivers for DXVK and you could have installed the drivers and Steam through the store, easier than using the terminal and downloading steam through Valve's site. Ragerds:<a herf="https://empiremarketlink.com">Moses Brodin</a>

Bhooshan Vijay

thanks for helping me out in this situation this technique really works

Bhooshan Vijay

thanks for helping me out in this situation this technique really works

Dele

Thanks. Very helpful tutorial/

Tenzing Norsang

@Flash Ahmed: use this line sudo rm -rf /usr/local/bin/npm

Add Comment