npm 切换镜像源
npm 切换镜像源
·
npm 默认使用的是国外的镜像源(https://registry.npmjs.org/),在国内访问可能会比较慢或不稳定。可以切换到国内的镜像源(如淘宝镜像)来加速下载。
1. 检查镜像源
npm config get registry
2. 切换为淘宝镜像
npm config set registry https://registry.npmmirror.com
3. 如果需要恢复默认镜像
npm config set registry https://registry.npmjs.org
更多推荐



所有评论(0)