xxxxxxxxxx
# step 1: specify node version (e.g: ~10.x)
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
# step 2: install
sudo apt install nodejs
xxxxxxxxxx
// For Mac with brew
brew install node@xx.xx.x
// For npm
npm install -g node@xx.xx.x
xxxxxxxxxx
//To install a specific version of npm locally for your project
$ npm install npm@version //replace version with the npm version you want to install
//To install globally
$ npm install -g npm@version //replace version with the npm version you want to install
xxxxxxxxxx
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash