Node, NPM and NVM Setup
What is npm?
npm is a package manager for the JavaScript programming language maintained by npm, Inc. npm is the default package manager for the JavaScript runtime environment Node.js. It consists of a command line client, also called npm, and an online database of public and paid-for private packages, called the npm registry.
Node, NPM and NVM install
1. NPM install
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
nodejs -v
cd ~
curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh
nano nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt-get install nodejs
nodejs -v
v10.14.0
npm -v
6.4.1
sudo apt install build-essential
2. NVM install
curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.35.3/install.sh -o install_nvm.sh
nano install_nvm.sh
bash install_nvm.sh
source ~/.profile
nvm ls-remote
nvm install 13.14.0
nvm use 13.14.0
node -v
Update:
https://github.com/nodesource/distributions/blob/master/README.md
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - &&\
sudo apt-get install -y nodejs