使用yarn时,报错connect ETIMEDOUT解决方案
问题
使用yarn install时,所有依赖下载都报错连接超时
办法一(切换yarn版本)
npm uninstall -g yarn
npm install -g yarn@1.22.17
办法二(配置文件问题)
yarn config set registry https://registry.npm.taobao.org
npm config set registry https://registry.npm.taobao.org
npm config set disturl https://npm.taobao.org/dist
npm config set 'https://registry.npmjs.org/'
办法三(更换镜像)
// 更换镜像
yarn config set registry https://registry.npm.taobao.org
// 移除原代理
yarn config delete proxy
其他问题
以上问题解决后,重新运行yarn install,又提示报错unable to verify the first certificate
处理方式
yarn config set “strict-ssl” false -g