淘寶鏡像

本文是解決使用npmyarn時,下載安裝包緩慢的問題。
解決這個問題最簡單的方法就是設置安裝包的倉庫地址爲淘寶鏡像地址。npm

npm

設置淘寶地址code

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

設置官方地址get

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

查看倉庫地址淘寶

npm get registry

yarn

設置淘寶地址下載

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

設置官方地址方法

yarn config set registry https://registry.yarnpkg.com

查看倉庫地址yarn

yarn config get registry
相關文章
相關標籤/搜索