天天看點

執行yarn指令報錯解決方案“error An unexpected error occurred: "https://registry.npm.taobao.org/”

  1. 因為yarn的源是
    https://registry.npm.taobao.org
               
  2. 而npm的源是
    https://registry.npm.org
               
  3. 檢視npm的源
    npm config get registry
               
  4. 修改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
               
  5. 添加 yarn源
    yarn add taobao https://registry.npm.taobao.org/
               
  6. 代理問題:
    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

進開發學習交流群:
執行yarn指令報錯解決方案“error An unexpected error occurred: "https://registry.npm.taobao.org/”

繼續閱讀