NVM switches the version of node


In some strange cases, the node version that a project depends on is different from your local node. At this time, you have several methods, and it is feasible to test yourself! Just sort out the blog you are looking for, so that you can check it later

1. Uninstall your local node, and then download a node again

2. Use n to manage the node version, which can be used directly“npm install -g nInstallation,Unfortunately, n does not support the window system. For the usage of N, please refer to this blogN manage node version

3. Using NVM management, you can freely switch the node version;

3.1 for Linux Installation of NVM, please refer to this elder brother’sBlog, I personally recommend git installation, which is relatively fast

Downloading node is very slow and may take a long time. Quickly change the source to domestic:

export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node

Then go to NVM install XXX


3.2 window installation NVM: you can refer tohere

NVM is slow to download node, and we also need to change the source of NPM to Taobao, so we also need to configure NVM,Reference here




======================Differences between NVM, NRM and NPM=====================

node package manage
Privatized NPM package, sinopia privatized installation, NPM privatized package management, etc
Component development, CMD, AMD, commonjs specification development and other details

Node version manager, which can switch different versions of node at will

Manager of NPM download address

Recommended Today

[redis] redis’ basic principles and solutions of cache breakdown, cache penetration and cache avalanche

Article catalogue Cache penetration principle resolvent Buffer breakdown principle resolvent Cache avalanche principle resolvent Cache penetration principle The data corresponding to the key does not exist in the database. Every request for the key cannot be obtained from the cache. The request will access the database. A large number of visits to the database may […]