切换npm和yarn的源为镜像源

切换npm源为镜像源:

npm config set registry https://registry.npmmirror.com

 

切换yarn源为镜像源:

yarn config set registry https://registry.npmmirror.com

 

切换npm源为默认源:

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

 

切换yarn源为默认源:

yarn config set registry https://registry.yarnpkg.com

 

查看npm源:

npm config get registry

 

查看yarn源:

yarn config get registry

 

posted @ 2021-02-07 19:32  starlog  阅读(458)  评论(0)    收藏  举报