- 因為yarn的源是
https://registry.npm.taobao.org
- 而npm的源是
https://registry.npm.org
- 檢視npm的源
npm config get registry
-
修改npm源
方法一:
方法二:npm config set registry https://registry.npm.taobao.org npm config set disturl https://npm.taobao.org/dist
yarn config set registry https://registry.npm.taobao.org/ yarn config set disturl https://npm.taobao.org/dist yarn config set sass-binary-site https://npm.taobao.org/mirrors/node-sass
- 添加 yarn源
yarn add taobao https://registry.npm.taobao.org/
- 代理問題:
yarn config rm proxy yarn config rm https-proxy
本文來自部落格園,作者:農碼一生,轉載請注明原文連結:https://www.cnblogs.com/wml-it/p/15642739.html
技術的發展日新月異,随着時間推移,無法保證本部落格所有内容的正确性。如有誤導,請大家見諒,歡迎評論區指正! 個人開源代碼連結: GitHub:https://github.com/ITMingliang
Gitee:https://gitee.com/mingliang_it
GitLab:https://gitlab.com/ITMingliang
進開發學習交流群: