查看镜像源
npm config get registry
更换为taobao源
npm config set registry https://registry.npm.taobao.org --global
npm config set disturl https://npm.taobao.org/dist --global
更换为官方镜像源
npm config set registry https://registry.npmjs.org/
yarn换源也是一样,把npm换成yarn
注意
taobao源只有下载。如果想publish,只能用官方源
本文介绍如何使用npm和yarn工具快速切换不同的镜像源,包括Taobao镜像源和官方镜像源的配置方法。适用于提高国内用户的下载速度。
1040

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



