先查看proxy和https-proxy
npm config get proxy
npm config get https-proxy
如果都为null,则执行下面的
npm config set registry http://registry.cnpmjs.org/
npm install -g cnpm --registry=https://registry.npm.taobao.org
否则则先set null
npm config set proxy null
npm config set https-proxy null
该博客介绍了如何检查和设置npm的proxy和https-proxy,当它们为null时,将registry设置为cnpmjs.org,否则将它们设为null。此外,还展示了使用淘宝npm镜像加速全局安装cnpm的方法。
825

被折叠的 条评论
为什么被折叠?



