npm和yarn更改淘宝镜像

NPM、YARN更改淘宝镜像

查看当前计算机的下载地址

# npm命令
npm config get registry
# yarn命令
yarn config get registry

修改为淘宝npm镜像

# npm命令
npm config set registry https://registry.npmmirror.com
 # yarn命令 
yarn config set registry
https://registry.npmmirror.com

修改为原始地址

# npm命令
npm config set registry http://registry.npmjs.org/
# yarn命令
yarn config set registry http://registry.npmjs.org/

 

posted @ 2020-03-21 13:19  lkc9  阅读(613)  评论(0编辑  收藏  举报