Use npm commonly used commands

1, View npm global installation directory 

npm config get prefix

2, the global installation path provided npm

npm config set prefix "C:\Program Files\nodejs\node-global"
npm config set cache "C:\Program Files\nodejs\node-cache"

3. Set npm domestic sources:

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

Guess you like

Origin www.cnblogs.com/damoblog/p/11595849.html