問題描述
使用 yarn install 的時候報以下錯誤
info There appears to be trouble with your network connection. Retrying…
info There appears to be trouble with your network connection. Retrying…
info There appears to be trouble with your network connection. Retrying…
解決辦法
1、網絡連接有問題,檢查自己的網絡是否正常2、若網絡正常,那問題可能出現在代理連接上
3、控制臺輸入命令 yarn config get registry,查看當前鏡像源是不是淘寶源。
3.1. 如果不是淘寶鏡像源,就通過命令 yarn config set registry https://registry.npm.taobao.org 將當前鏡像源設置為淘寶鏡像
3.2.然后重新執行 yarn install
4、如果以上步驟還未解決,那就重新配置
4.1. 安裝好后更換淘寶鏡像 yarn config set registry https://registry.npm.taobao.org
4.2. 移除原代理
?yarn config delete proxy
??npm config rm proxy
?npm config rm https-proxy
4.3. 安裝 cnpm 鏡像并使用代理 registry
安裝 cnpm 鏡像
npm install -g cnpm --registry=https://registry.npm.taobao.org
使用代理 registry
npm config set registry https://registry.npm.taobao.org
4.4. npm install
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!