npm國內淘寶鏡像


理由

由於npm的registry地址是國外的,速度很慢,所以推薦使用淘寶鏡像:https://registry.npm.taobao.org

配置方法

臨時配置

npm --registry https://registry.npm.taobao.org install <Module Name>

永久配置一

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

恢復原來地址的方法:
npm config set registry https://registry.npmjs.org

使用cnpm

npm install -g cnpm --registry=https://registry.npm.taobao.org
使用時用cnpm代替npm:如cnpm install <Module Name>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM