You can skip this section if you already have a working Node.js
>=12.0 installation. If not, here's how to install it on Ubuntu, MacOS and Windows.
Copy and paste these commands in a terminal:
sudo apt update sudo apt install curl git curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - sudo apt install nodejs
Make sure you have
git installed. Otherwise, follow these instructions.
There are multiple ways of installing Node.js on MacOS. We will be using Node Version Manager (nvm). Copy and paste these commands in a terminal:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.39.1/install.sh | bash nvm install 16 nvm use 16 nvm alias default 16 npm install npm --global # Upgrade npm to the latest version
Installing Node.js on Windows requires a few manual steps. We'll install git, Node.js 16.x and npm. Download and run these:
If your version of Node.js is older than
16.0 follow the instructions below to upgrade.
sudo apt remove nodejsin a terminal to remove Node.js.
- Find the version of Node.js that you want to install here and follow the instructions.
sudo apt update && sudo apt install nodejsin a terminal to install Node.js again.
You can change your Node.js version using nvm. To upgrade to Node.js
16.x run these in a terminal:
nvm install 16 nvm use 16 nvm alias default 16 npm install npm --global # Upgrade npm to the latest version