一、Yarn 设置淘宝镜像
1.查询当前配置的镜像

yarn config get registry  // 默认:https://registry.yarnpkg.com

2.设置成淘宝镜像

yarn config set registry http://registry.npm.taobao.org/

3.换成原来的

yarn config set registry http://registry.npmjs.org/

二、NPM设置淘宝镜像
1.查询当前配置的镜像

npm get registry

2.设置成淘宝镜像

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

3.换成原来的

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

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐