npm更換阿里雲鏡像

因爲npm安裝插件是從國外服務器下載,受網絡影響大,經常下載緩慢或出現異常

同時避免一些坑,就沒按照網上的方法使用cnpm,而是改動npm的鏡像源

阿里在國內搭建了鏡像服務器:http://npm.taobao.org

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

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

改動完成後,查看本地鏡像源

npm config get registry

安裝新版Vue CLI3

npm install -g @vue/cli

查看版本呢

vue --version

 

 

Reference:

https://blog.csdn.net/a249040113/article/details/81567430

https://blog.csdn.net/huiqingshuiping/article/details/102823143

https://juejin.im/post/6878194344273117192

https://www.cnblogs.com/chase-star/p/10455703.html

https://zhuanlan.zhihu.com/p/144946960

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章