Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install is broken by pngquant-bin dependency #56

Open
anthonyaam opened this issue Mar 16, 2018 · 7 comments
Open

npm install is broken by pngquant-bin dependency #56

anthonyaam opened this issue Mar 16, 2018 · 7 comments

Comments

@anthonyaam
Copy link

I'm getting the below error when running npm install imagemin-webpack-plugin.

pngquant failed to build, make sure that libpng is installed

This pngquant-bin issue describes the problem in the pngquant-bin dependency.

@Klathmon
Copy link
Owner

Klathmon commented Mar 19, 2018

Unfortunately this is a problem with pngquant and not something I can fix.

However, I did just update an old branch named no-default-plugins that you can use as a workaround until pngquant fixes their stuff.

You should include it in your package.json like this:

"imagemin-webpack-plugin": "Klathmon/imagemin-webpack-plugin#no-default-plugins"

You will need to manually install any plugins you want yourself and put their options in the plugins option in this webpack plugin in order for anything to be optimized/compressed.

Don't rely on this branch sticking around for a long time though, or ever getting updated. If you are going to use this long-term, i'd recommend forking this repo and pointing to the no-default-plugins on your fork so that my changes to this branch don't break your setup again.

@anthonyaam
Copy link
Author

Even though the code fix will be outside of imagemin-webpack-plugin, I would suggest keeping this issue open while users are unable to npm install imagemin-webpack-plugin so that other users can find these instructions.

@Klathmon
Copy link
Owner

Fair enough! I won't really be checking back on it all that often though, so if someone notices that this is fixed ping me here so I can close this and update anything that's needed.

@Klathmon Klathmon reopened this Mar 19, 2018
@codejet
Copy link

codejet commented Jul 27, 2018

Version 6.0.0 of imagemin-pngquant was released. Maybe it fixes this issue? If so, updating the dependency would be nice (I guess a PR for that would be overkill...?).

@Klathmon
Copy link
Owner

I'll update it later today and see if it solves the problem, thanks for the heads up!

And a PR is never overkill!

@Klathmon
Copy link
Owner

@anthonyaam version 2.2.0 of this plugin was published that upgrades imagemin to version 6. Can you give it a try at some point and see if it solves your issues? Thanks!

@GitGump
Copy link

GitGump commented Apr 3, 2019

@Klathmon I change imagemin-webpack-plugin version to 2.2.0, and npm install, still it trys to install [email protected] and failed, I don't know why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants