yarn install 报error Error: connect ETIMEDOUT 104.16.24.34:443

用yarn install 时候 报

yarn install v1.22.21
[1/4] Resolving packages...
[2/4] Fetching packages...
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...
info There appears to be trouble with your network connection. Retrying...
error Error: connect ETIMEDOUT 104.16.24.34:443
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

将strict-ssl设置为false   yarn config set strict-ssl false 重新运行还是会报同样的错

百度了一下看到网上说

把node-sass镜像源进行设置成国内的

yarn config set sass-binary-site http://npm.taobao.org/mirrors/node-sass

然后将资源地址设置为淘宝镜像

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

查看设置项 

yarn config get registry

如下

再次yarn install 成功了

code ECONNREFUSED npm ERR! syscall connect npm ERR! errno ECONNREFUSED npm ERR! FetchError: request to https://registry.npmjs.org/pnpm failed, reason: connect ECONNREFUSED 127.0.0.1:10809 npm ERR! at ClientRequest.<anonymous> (D:\environment\node\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14) npm ERR! at ClientRequest.emit (node:events:513:28) npm ERR! at onerror (D:\environment\node\node_modules\npm\node_modules\agent-base\dist\src\index.js:117:21) npm ERR! at callbackError (D:\environment\node\node_modules\npm\node_modules\agent-base\dist\src\index.js:136:17) npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:95:5) npm ERR! FetchError: request to https://registry.npmjs.org/pnpm failed, reason: connect ECONNREFUSED 127.0.0.1:10809 npm ERR! at ClientRequest.<anonymous> (D:\environment\node\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14) npm ERR! at ClientRequest.emit (node:events:513:28) npm ERR! at onerror (D:\environment\node\node_modules\npm\node_modules\agent-base\dist\src\index.js:117:21) npm ERR! at callbackError (D:\environment\node\node_modules\npm\node_modules\agent-base\dist\src\index.js:136:17) npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { npm ERR! code: 'ECONNREFUSED', npm ERR! errno: 'ECONNREFUSED', npm ERR! syscall: 'connect', npm ERR! address: '127.0.0.1', npm ERR! port: 10809, npm ERR! type: 'system', npm ERR! requiredBy: '.' npm ERR! } npm ERR! npm ERR! If you are behind a proxy, please make sure that the npm ERR! 'proxy' config is set properly. See: 'npm help config' npm ERR! A complete log of this run can be found in: npm ERR! D:\environment\node\node_cache\_logs\2023-07-24T01_33_36_101Z-debug-0.log
07-25
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值