npm设置仓库


如果国外官方的npm仓库下载速度很慢的话,可以考虑更换npm仓库,加快下载包的速度。 
1.通过config命令

npm config set registry https://registry.npm.taobao.org npm config list #查看npm当前配置

 

2.命令行指定 
每次执行命令前加入–registry指定仓库路径

npm --registry https://registry.npm.taobao.org install

 

 

3.编辑 ~/.npmrc 加入下面内容

registry = https://registry.npm.taobao.org


免责声明!

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



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