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

Binary doesnt seem to work #40

Closed
sweetsamy21 opened this issue Jul 24, 2017 · 5 comments
Closed

Binary doesnt seem to work #40

sweetsamy21 opened this issue Jul 24, 2017 · 5 comments

Comments

@sweetsamy21
Copy link

Hi there,

I installed the above plugin and used it in my gulp task to minify images. works like a charm on my local machine. When I deploy the same code in production environment, I get the following issues. Please help...!!

/node_modules/pngquant-bin/vendor/pngquant` binary doesn't seem to work correctly

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

Do I have to add another npm like libpng-dev in my package.json?

@jagged3dge
Copy link

jagged3dge commented Aug 8, 2017

libpng-dev is a linux package. It is required to build/compile the binary executable of pngquant on your production box during the package's installation phase. This binary executable is re-built at every fresh installation of a version the npm package because it uses native OS C++ bindings to fully optimize the minification process.

You may look up the docs of your deployment machine's OS flavour for whichever package manager is used to install the libpng-dev package before you try to install this lib via npm.

For example:
On CentOS/RHEL, you'd use yum package manager, like sudo yum install libpng-dev, wait for it to complete, then do npm install.
On Ubuntu, you'd use sudo apt install libpng-dev, then npm install.

@rico-ocepek
Copy link

Also try to restart your machine after installing the libpng-dev package - this helped in my case.

@francosalcedo
Copy link

reboot it worked for me <3 !

@thegbom
Copy link

thegbom commented May 21, 2018

I upgraded ubuntu, and upgraded npm and node. Then it worked just fine.

@natanr123
Copy link

I am not sure it is related but the problem was solved for me after adding .dockerignore with node_modules

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

No branches or pull requests

7 participants