Check if you already have node installed or not. If a version is returned, this means node is installed

node -v

Installing node using Node Version Manager NVM. NVM helps manage multiple version of node installation simultaneously

Download NVM setup and install. In case you want to update the existing NVM install, you need to download the latest version and install.

Once installed you can run this command

nvm ls
nvm list

If node is installed it will return the version installed, if not it will return blank. In both the cases if you want to install or upgrade to latest node version just run

nvm install latest

To install LTS version of node (for logn therm stability)

nvm install lts

To list and install any specific version of node

nvm list available


nvm install node-version-number

Once you install a version of Node, the corresponding version of NPM (node package manager) is installed for you. So you don’t need to install NPM separately.

To use a specific version of node

nvm use lts
nvm use latest
nvm use node-version-number

To uninstall a node version that you dont want to use

nvm uninstall node-version-number

To check what node modules or packages are installed, use the command

npm -g list

Last updated