getaddrinfo ENOENT raw.githubusercontent.com

Error: Command failed: C:\windows\system32\cmd.exe /s /c "./configure --disable-shared

  1. 错误关键词:cwebp-binautoreconf -ivfpngquantlibpng-dev

  1. 完整的错误信息有3条:

  • Error: Command failed: C:\windows\system32\cmd.exe /s /c "./configure --disable-shared --prefix="D:\Project\vue-admin-beautiful-template\node_modules\cwebp-bin\vendor" --bindir="D:\Project\vue-admin-beautiful-template\node_modules\cwebp-bin\vendor""

  • Error: Command failed: C:\windows\system32\cmd.exe /s /c "autoreconf -ivf"
    'autoreconf'

  • Error: Command failed: C:\windows\system32\cmd.exe /s /c "./configure --with-system-zlib --prefix="D:\Project\vue-admin-beautiful-template\node_modules\optipng-bin\vendor" --bindir="D:\Project\vue-admin-beautiful-template\node_modules\optipng-bin\vendor""

  • Error: pngquant failed to build, make sure that libpng-dev is installed

发生场景:react 老项目在执行npm install时报错

完整的错误

cwebp-bin@5.1.0 postinstall D:\Project\vue-admin-beautiful-template\node_modules\cwebp-bin
> node lib/install.js

  ‼ getaddrinfo ENOENT raw.githubusercontent.com
  ‼ cwebp pre-build test failed
  i compiling from source
  × Error: Command failed: C:\windows\system32\cmd.exe /s /c "./configure --disable-shared --prefix="D:\Project\vue-admin-beautiful-template\node_modules\cwebp-bin\vendor" --bindir="D:\Project\vue-admin-beautiful-template\node_modules\cwebp-bin\vendor""
'.' ����� ����ⲿ���Ҳ���ǿ����еij���
���������ļ���


    at D:\Project\vue-admin-beautiful-template\node_modules\bin-build\node_modules\execa\index.js:231:11
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Promise.all (index 0)

> gifsicle@5.1.0 postinstall D:\Project\vue-admin-beautiful-template\node_modules\gifsicle
> node lib/install.js

  ‼ getaddrinfo ENOENT raw.githubusercontent.com
  ‼ gifsicle pre-build test failed
  i compiling from source
  × Error: Command failed: C:\windows\system32\cmd.exe /s /c "autoreconf -ivf"
'autoreconf' ����� ����ⲿ���Ҳ���ǿ����еij���
���������ļ���

解决办法

找到问题所在,解决起来就容易得多了,直接找到可用的ip地址写进host里面,这里刚好有一个,如果下面的ip地址不行,找到可用ip地址就好

 199.232.28.133 raw.githubusercontent.com

或者

185.199.108.133 raw.githubusercontent.com

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值