How to install the latest version of node.js on raspberry Pi?

I want to install the latest stable version of Node.js on Raspberry Pi 3. How can I do this so that: a) I can always upgrade to the latest version of LTS. b) You can easily switch between versions

+6
source share
1 answer

Node version manager works fine even for ARM-based processors (e.g. Raspberry Pi).

You need to uninstall the existing version of node installed on Raspbian (if you are using this distribution):

Delete old:

sudo -i
apt-get remove nodered -y
apt-get remove nodejs nodejs-legacy -y
exit

Install n (it will also install the latest stable Node.js):

curl -L https://git.io/n-install | bash

Make sure that:

pi@raspberrypi:~ $ node --version
nv7.6.0
pi@raspberrypi:~ $ npm --version
4.1.2
+15
source

Source: https://habr.com/ru/post/1015682/


All Articles