問題描述
使用 yarn install 的時(shí)候報(bào)以下錯(cuò)誤
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、網(wǎng)絡(luò)連接有問題,檢查自己的網(wǎng)絡(luò)是否正常2、若網(wǎng)絡(luò)正常,那問題可能出現(xiàn)在代理連接上
3、控制臺(tái)輸入命令 yarn config get registry,查看當(dāng)前鏡像源是不是淘寶源。
3.1. 如果不是淘寶鏡像源,就通過命令 yarn config set registry https://registry.npm.taobao.org 將當(dāng)前鏡像源設(shè)置為淘寶鏡像
3.2.然后重新執(zhí)行 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
【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!