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

posted @ 2019-01-25 09:29  keepmoving2019  阅读(158)  评论(0)    收藏  举报