NVM is a node version management tool. You can use NVM to manage multiple node versions

You are advised to uninstall nodes installed in the system before installing the NVM

Install NVM install command:

The curl - o - https://raw.githubusercontent.com/creationix/nvm/v0.33.8/instaCopy the code

If command not found: NVM is displayed when you enter NVM on a new terminal, the possible causes are as follows:

Your system may be missing a.bash_profile file. You can create one (via vi or vim), open copy and paste the following code (the best 3 lines for a terminal after a successful NVM installation), save it, and run install again.

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
Copy the code

Save the Settings and run the source ~/.bashrc command

NVM install stable ## Install node v9.5.0 (NPM v5.6.0)

NVM install

## Install v4.4.0, NVM install v4.4.0, NVM install 4.4

NVM uninstall

## Deletes the specified version that has been installed. The syntax is similar to install

NVM use

## Switch to using the specified version of Node

NVM ls ## lists all installed versions

NVM ls-remote ## List all remote server versions

NVM current ## Displays the current version

NVM alias


## Add aliases for different version numbers

NVM unalias

## Delete the defined alias

NVM Scant-Packages

## Reinstall the specified version of the NPM package globally in the current Node version environment