在使用yarn安装依赖包时报错,提示信息:error An unexpected error occurred: “https://registry.yarnpkg.com/killable/-/killable-1.0.0.tgz: connect ETIMEDOUT 104.16.19.35:443”
匿名 · 更新于 2022/5/16

在使用yarn安装依赖包时报错,提示信息:error An unexpected error occurred: “https://registry.yarnpkg.com/killable/-/killable-1.0.0.tgz: connect ETIMEDOUT 104.16.19.35:443”
这是由于资源地址请求超时造成的,更换一下请求地址即可。
解决方案:
运行命令,把资源地址设置成npm淘宝源
npm config set registry https://registry.npm.taobao.org
npm config set disturl https://npm.taobao.org/dist
- 1
- 2
附带问题:node-sass缓慢

原因:代理出现了问题,删除之即可
解决方案:
npm config rm proxy
npm config rm https-proxy
- 1
- 2
删除之后一切ok
对node-sass镜像源进行设置
yarn config set sass-binary-site http://npm.taobao.org/mirrors/node-sass
- 1
或
npm config set sass-binary-site http://npm.taobao.org/mirrors/node-sass
