npm配置

1.查看npm的config

npm config ls

2.设置代理

npm config set proxy http://127.0.0.1:1080(SS)

npm config set https-proxy https://127.0.0.1:1080(SS)

删除代理

npm config rm proxy

3.设置淘宝源

 临时使用 npm --registry https://registry.npm.taobao.org install ***

永久使用  npm config set registry https://registry.npm.taobao.org

使用cnpm npm install -g cnpm --registry=https://registry.npm.taobao.org

猜你喜欢

转载自www.cnblogs.com/delpy/p/10318016.html
NPM