First thing we need to do is to install nodejs, you can find the installation steps and archives from the official website here. It is recommended to use the LTS version of node to avoid any kind of interruptions.
- Install
curl
sudo apt update
sudo apt upgrade
sudo apt install curl
- Get
nodejs
PPA Switch to root directory
cd ~
curl -sL https://deb.nodesource.com/setup_12.x -o nodesource_setup.sh
- Run the script under sudo:
sudo bash nodesource_setup.sh
- Install nodejs
sudo apt install nodejs
- In order for some npm packages to work (those that require compiling code from source, for example), you will need to install the build-essential package:
sudo apt install build-essential