win10 node and a lower mounting npm

The first step: the official website to download the free installation of the archive

The second step: decompression, two files are created node-cache, node-global module is used to specify the path and cache path npm (similar to the java maven repository)

 

The third step: a new configuration environment variable NODE_HOME variable in system variables, to add new NODE_HOME PATH.

 

 

Step four: Open cmd, configured just the new two folders

npm config set prefix "D:\Program Files (x86)\nodejs\node-v12.10.0-win-x64\node-global"

npm config set cache "D:\Program Files (x86)\nodejs\node-v12.10.0-win-x64\node-cache"

Step Five: Set Taobao domestic mirroring (equivalent to set maven Ali is the remote mirror repository)

Open cmd input

npm config set registry https://registry.npm.taobao.org

Set over input

npm config get registry view mirror right set of domestic

View installed node and npm

The input node --version cmd 

Input cmd under npm --version

 

 End: node will release the latest version every year, and last year's version as the stable version, I am here to download the latest version, go wrong again, the pursuit of stability can download a version of the node v10

Guess you like

Origin www.cnblogs.com/mlzdev/p/11520325.html