1.查询npm,yarn等下载包的源地址
npm config get registry
yarn config get registry
2.设置成国内淘宝镜像的地址(加快下载第三方包的速度,服务器在国内,超快的)
npm config set registry https://registry.npm.taobao.org
yarn config set registry https://registry.npm.taobao.org
本文介绍如何查询npm和yarn的默认源地址,并提供步骤将源切换至国内淘宝镜像,大幅提升第三方包下载速度。
1.查询npm,yarn等下载包的源地址
npm config get registry
yarn config get registry
2.设置成国内淘宝镜像的地址(加快下载第三方包的速度,服务器在国内,超快的)
npm config set registry https://registry.npm.taobao.org
yarn config set registry https://registry.npm.taobao.org
6025
999
1911
648

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