npm切换下载源(三种中国内源)
1.查看源
通常默认官方源是https://registry.npmjs.org
npm config get registry
2.切换源
在国内使用官方下载依赖往往速度慢,易出错,因此我们选择切换国内镜像源,根据需求或喜好选择下列命令中的一条
//切换淘宝源
npm config set registry https://registry.npm.taobao.org
//切换腾讯源
npm config set registry http://mirrors.cloud.tencent.com/npm/
//切换阿里云源
npm config set registry https://registry.npmmirror.com
————————————————
原文链接:https://blog.csdn.net/weixin_43575792/article/details/132550379