自学内容网 自学内容网

npm下载淘宝镜像的方式和用法

第一种

下载cnpm

npm install --global cnpm

下载的包直接通过淘宝镜像下载,也同样可以使用npm

第二种

如果你不想下载cnpm,也可以直接添加下载地址

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

这样你就使用npm命令的时候也是淘宝镜像下载了。

检查设置成功与否

npm config list

出现 registry = https://registry.npm.taobao.org

则设置成功

如果你不想使用淘宝镜像了,你也可以恢复使用原本的地址

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


原文地址:https://blog.csdn.net/wangchaohpu/article/details/142614093

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!