imagemin / pngquant-bin

pngquant bin-wrapper that makes it seamlessly available as a local dependency
http://pngquant.org
Other
115 stars 95 forks source link

Error: v5.0.2@postinstall Response code 500 (Internal Server Error) #109

Closed dannystyleart closed 4 years ago

dannystyleart commented 4 years ago

Hi there!

Our build pipeline fails because imagemin-pngquant tries to download pngquant binary on postinstall lifecycle.

We are trying from both windows, freebsd, ubuntu, macos and deeping os-es. Both responds the same:

pngquant-bin@5.0.2 postinstall /media/dannystyle/_dde_data/Projects/onbox/landing/node_modules/pngquant-bin
> node lib/install.js

  ⚠ Response code 500 (Internal Server Error)
  ⚠ pngquant pre-build test failed
  ℹ compiling from source
  ✖ Error: pngquant failed to build, make sure that libpng-dev is installed
    at /media/dannystyle/_dde_data/Projects/onbox/landing/node_modules/bin-build/node_modules/execa/index.js:231:11
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Promise.all (index 0)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pngquant-bin@5.0.2 postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the pngquant-bin@5.0.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/dannystyle/.npm/_logs/2020-04-23T13_52_42_304Z-debug.log

Is there any workaround?

It was working earlier this day and no versions updated.

moshie commented 4 years ago

Recently ran into this and it was caused by github being down at the time. This package relies on github being up to fetch this: https://raw.githubusercontent.com/imagemin/pngquant-bin/v5.0.2/vendor/linux/x64/pngquant

gidztech commented 4 years ago

Is it possible for the library to provide an environment variable to set the location to find the binary? It looks like someone else raised this last year: https://github.com/imagemin/pngquant-bin/issues/107

dannystyleart commented 4 years ago

Yes, I Just got the info that incident was resolved. Noé everything goes fine, thanks.