NVM is the node.js version manager that can install and switch between different versions of Node.js

Original address: blog.csdn.net/zhan_lijian…

Node

1. Uninstall the installed Node package

Baijiahao.baidu.com/s?id=169220…

2. Download the NVM

Github.com/coreybutler…

Nvm-noinstall. zip: green installation-free version, which requires configuration. Nvm-setup. zip: installation version, recommendedCopy the code
3. The installation

Complete the installation as prompted. After the installation is complete, check whether the installation is successful

Enter NVM on the CMD command-line interface (CLI). If the NVM version number and help commands are displayed, the NVM is successfully installed.

Note: Two paths are selected during the installation. The first path is the NVM file installation path, and the second path is the Node installation path

4. Modify the Settings. TXT

Find settings. TXT in your installation directory, open it and add

node_mirror: https://npm.taobao.org/mirrors/node/

npm_mirror: https://npm.taobao.org/mirrors/npm/

This step is mainly to change the NPM image to taobao’s image, which can improve the download speed

5. The node. Js installation
NVM // The NVW command NVM ls // Check the installed node version NVM install // Install the latest version NVM NVM install vXX // Install the corresponding vXX node NVM uninstall vXX NVM use XXX // Select XXX version num list // View the locally installed version NVM list available // View the common NVM command NVM list of all versions NVM list available // Check the version that can be installed on the network. NVM version // Check the current version. NVM use <version> // Switch to the specified version NVM unalias <name> ## Delete the defined alias NVM scanted-packages <version> ## In the current node version, NVM on enable nodeJS control NVM off Disable nodejs control NVM proxy View Settings and proxy NVM node_mirror [url] Set or view node_mirror in setting.txt, https://nodejs.org/dist/ NVM npm_mirror [url] setting npm_mirror in setting.txt https://github.com/npm/npm/archive/. NVM uninstall < version > uninstall set version of NVM use [version] [arch] version of the switch of the node and digits NVM root [path] Sets and views the root pathCopy the code

Yarn

NPM install yarn@latest -g // Upgrade the latest version NPM install [email protected] -g // Install the specified versionCopy the code

Set Taobao Mirror

Blog.csdn.net/qq_42984640…

NPM config get registry / / view the current mirror NPM install - g CNPM - registry=https://registry.npm.taobao.org/download/taobao mirror NPM uninstall CNPM - g / / unloading CNPM NPM config set registry HTTP: / / https://registry.npm.taobao.org / / setting taobao mirror NPM config set disturl https://npm.taobao.org/dist NPM config delete registry / / cancel the taobao mirrorCopy the code