npm 和 yarn 更改为淘宝镜像,cnpm安装


查看registry

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

cnpm淘宝镜像安装

npm install -g cnpm -registry=https://registry.npm.taobao.org

 

设置为淘宝镜像

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

yarn config set registry http://registry.npm.taobao.org/

设置为原镜像

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

# yarn命令
yarn config set registry http://registry.npmjs.org/ 
或者
yarn config set registry https://registry.yarnpkg.com

 

参考地址1:https://www.cnblogs.com/lkc9/p/12538914.html
参考地址2:https://developer.aliyun.com/mirror/NPM?from=tnpm


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM