npm yarn 淘宝镜像命令设置

一、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/

 

 

注:原淘宝镜像已过期,更新最新镜像

https://registry.npmmirror.com

 

posted on 2023-07-13 13:15  写最骚的代码  阅读(572)  评论(0编辑  收藏  举报