question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pngquant: Command Failed

See original GitHub issue

Hi, i’m trying to compress a PNG with the example settings you provided in the README file:

'image-webpack?{progressive:true, optimizationLevel: 7, interlaced: false, pngquant:{quality: "65-90", speed: 4}}'

However, when i run my build, i get this error:

ERROR in ./src/assets/images/highResHell.png
Module build failed: Error: Command failed: /home/elias/Projects/Javascript/idexdanmark/node_modules/pngquant-bin/vendor/pngquant --output /tmp/012c00ce-0e87-4c68-bfa8-185586e92037 /tmp/7add16f3-8bf9-4ad2-b370-ad97ce2b9856 --quality 65-90 --speed 4

    at ChildProcess.exithandler (child_process.js:202:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:852:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
 @ ./src/components/ExampleComponent/index.js 7:19-59

I tried removing my node_modules folder and reinstalling my dependencies, but it had no effect.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

10reactions
alopescommented, Mar 28, 2017

npm install imagemin/imagemin-pngquant --save did it for me.

0reactions
nicoopratcommented, Oct 24, 2017

Optimizing large PNGs (1Mo) is very complicated: pngquant was crashing, and optipng is very slow with almost no difference in resulting image (quality or weight). Using roots/sage, optimizing a few PNGs took more than 200 seconds! Is it normal? What’s the point of using two different librairies for optimizing PNGs?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pngquant failed to build, make sure that libpng-dev is installed ...
If you have a package.json file , then try npm install , it will install all the dependencies · Got it fixed. ·...
Read more >
npm install is broken by pngquant-bin dependency #46 - GitHub
Failed to resolve the domain name raw.githubusercontent.com which is commonly caused by DNS pollution. Lack of corresponding Visual C++ runtime ...
Read more >
Fix "Error: pngquant failed to build, make sure that libpng-dev ...
I kept getting an error message “Error: pngquant failed to build, make sure that libpng-dev is installed” while trying to build a Nodejs ......
Read more >
pngquant failed to build, make sure that libpng-dev is installed ...
Command I tried $ npm i –unsafe-perm. Got following Error; ✓ pngquant pre-build test passed successfully ✖ Error: pngquant failed to build ......
Read more >
pngquant — lossy PNG compressor
pngquant is a command-line utility and a library for lossy compression of PNG ... When remapping, error diffusion is applied only to areas...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found