查看npm和yarn 的镜像源和配置淘宝镜像源

Posted zqblog1314

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了查看npm和yarn 的镜像源和配置淘宝镜像源相关的知识,希望对你有一定的参考价值。

1、查看

 

#npm:
npm config get registry



#yarn:
yarn config get registry

 

2、设置

#(命令行)设置淘宝源
#npm: npm config
set registry https://registry.npm.taobao.org


#yarn
yarn config set registry https://registry.npm.taobao.org --global
yarn config set disturl https://npm.taobao.org/dist --global

 

以上是关于查看npm和yarn 的镜像源和配置淘宝镜像源的主要内容,如果未能解决你的问题,请参考以下文章