Notes on node version management

Description: The terminal tool used is secureCRT.

First, install node's version management tool, nvm:

Officially provides a variety of installation methods https://github.com/creationix/nvm/blob/master/README.md

I use:

wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash

The output is as follows:

After the installation is complete, running the nvm command will prompt that the command cannot be found. At this time, you need to run source ~/.bashrc, exit crt and re-enter, you can:

Second: After installing nvm, you can perform multi-version management on node.

Run nvm install node to install the latest version

Run nvm install 0.8.12 to install version 0.8.12

Run nvm ls to see the versions available on the current machine:

Third: version switching

Use the command [nvm use version number], for example:

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325720731&siteId=291194637