在执行:yarn install 时报:error Error: connect ETIMEDOUT 104.16.31.34:443
后面改用:yarn install --network-timeout=30000
仍然报相同的错误
D:\rocketmq-dashboard-master\frontend>yarn install --network-timeout=30000
yarn install v1.22.22
[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...
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...
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...
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.31.34:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
最后解决方法:
1、运行科学上网软件
2、给yarn添加代理,cmd窗口中执行:yarn config set https-proxy http://代理服务器IP:代理软件端口
3、最后再执行:yarn install 即可
D:\>yarn config set https-proxy http://127.0.0.1:7890
yarn config v1.22.22
success Set "https-proxy" to "http://127.0.0.1:7890".
Done in 0.07s.