It has been 993 days since the last update, the content of the article may be outdated.

当需要使用淘宝镜像时也就是所谓的npm切换至cnpm步骤如下:

npm–>cnpm

终端输入:

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

建议测试下是否切换成功,可以运用下方命令测试:

plaintext
npm config get registry

成功的话会显示:https://registry.npm.taobao.org/

cnpm–>npm

终端输入:

plaintext
npm config set registry https://registry.npmjs.org

建议测试下是否切换成功,可以运用下方命令测试:

plaintext
npm config get registry

成功的话会显示https://registry.npmjs.org/