其他分享
首页 > 其他分享> > An unexpected error occurred: “ “.tgz: ESOCKETTIMEDOUT“.

An unexpected error occurred: “ “.tgz: ESOCKETTIMEDOUT“.

作者:互联网

yarn安装依赖包报错 An unexpected error occurred: “https://registry.npmjs.org/@ant-design/icons/-/icons-2.1.1.tgz: ESOCKETTIMEDOUT”.

是因为网络不好导致的下载超时
1、更改下载地址

npm config set registry https://registry.npm.taobao.org  
npm config set disturl https://npm.taobao.org/dist  

2、对node-sass镜像源进行设置

yarn config set sass-binary-site http://npm.taobao.org/mirrors/node-sass
PS D:\zxy\code\jeecg\jeecg-boot-master\ant-design-vue-jeecg> yarn config set sass-binary-site http://npm.taobao.org/mirrors/node-sass
yarn config v1.22.10
success Set "sass-binary-site" to "http://npm.taobao.org/mirrors/node-sass".
Done in 0.08s.

显示如下信息重新下载即可

标签:npm,node,unexpected,sass,tgz,occurred,taobao,org,config
来源: https://blog.csdn.net/qq_43610311/article/details/117035719