Install Node.js on macOS

Page content

Install

On Ubuntu 20

https://github.com/nodesource/distributions/blob/master/README.md

curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs

On Ubuntu 20 in GCP (Mar. 2021)

curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
sudo apt-get install -y nodejs

On macOS

brew update
brew install node

Check

Version check as of March 2020.

node --version
#v13.10.1

npm --version
#6.13.7

Update npm version

npm install -g npm@latest