npm, yarn查看源和换源:
npm config get registry // 查看npm当前镜像源
npm config set registry https://registry.npmmirror.org // 设置npm镜像源为淘宝镜像
yarn config get registry // 查看yarn当前镜像源
yarn config set registry https://registry.npmmirror.org // 设置yarn镜像源为淘宝镜像
镜像源地址部分如下:
npm --- https://registry.npmjs.org/
cnpm --- https://r.cnpmjs.org/
taobao --- https://registry.npmmirror.org
nj --- https://registry.nodejitsu.com/
rednpm --- https://registry.mirror.cqupt.edu.cn/
npmMirror --- https://skimdb.npmjs.com/registry/
deunpm --- http://registry.enpmjs.org/
注:淘宝镜像源已经由 https://registry.npm.taobao.org改成https://registry.npmmirror.org
本文介绍了如何查看和设置npm及yarn的镜像源,包括使用npmconfig和yarnconfig命令来切换到淘宝镜像源。确保更快地下载依赖包,提高效率。
337

被折叠的 条评论
为什么被折叠?



