This article teaches you how to install the latest version of Node.js on Ubuntu.
The commands are as follows:
cd ~
apt-get update
wget -O nodejs_latest.sh https://raw.githubusercontent.com/nodesource/distributions/master/deb/setup_current.x
bash nodejs_latest.sh
apt install nodejs
After installation, use nodejs -V
and npm -V
to check the versions of nodejs
and npm
.
Reprinted from Misaka no's blog:
https://www.misakano.eu.org/2021/08/17/Install-the-latest-version-of-Node-js-on-Ubuntu/