Error with npm update: pngquant binary does not seem to work correctly

failed at the pngquant-bin@5.0.2 postinstall script.
image-webpack-loader pngquant
yarn libpng
pngquant pre-build test failed gatsby
permission denied open usr local lib node_modules/pngquant-bin/vendor/pngquant
pngquant self signed certificate
cannot find module 'imagemin-pngquant
libpng dev redhat

I am getting the following error with my npm update command:

> pngquant-bin@4.0.0 postinstall /var/www/pp/20180315202846/node_modules/pngquant-bin
> node lib/install.js

  ⚠ The `/var/www/pp/20180315202846/node_modules/pngquant-bin/vendor/pngquant` binary doesn't seem to work correctly
  ⚠ pngquant pre-build test failed
  ℹ compiling from source
  ✔ pngquant pre-build test passed successfully
  ✖ RequestError: pngquant failed to build, make sure that libpng-dev is installed
    at ClientRequest.req.once.err (/var/www/pp/20180315202846/node_modules/pngquant-bin/node_modules/got/index.js:111:21)
    at Object.onceWrapper (events.js:272:13)
    at ClientRequest.emit (events.js:180:13)
    at ClientRequest.onConnect (/var/www/pp/20180315202846/node_modules/pngquant-bin/node_modules/tunnel-agent/index.js:168:23)
    at Object.onceWrapper (events.js:272:13)
    at ClientRequest.emit (events.js:180:13)
    at Socket.socketOnData (_http_client.js:476:11)
    at Socket.emit (events.js:180:13)
    at addChunk (_stream_readable.js:269:12)
    at readableAddChunk (_stream_readable.js:256:11)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pngquant-bin@4.0.0 postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pngquant-bin@4.0.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I already did:

 apt-get install libpng-dev

but I still get this error. Any ideas? (My distribution is Debian 9.2)

For Ubuntu you need to run:

wget -q -O /tmp/libpng12.deb http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb \
  && sudo dpkg -i /tmp/libpng12.deb \
  && rm /tmp/libpng12.deb

node_modules/pngquant-bin/vendor/pngquant` binary doesn't seem , I'am getting this error today when i try to make a npm update on my project: GitHub is home to over 50 million developers working together to host and /​pngquant-bin/vendor/pngquant binary doesn't seem to work correctly @danherd if you have someone on your project that hasn't run npm update yet you could have them check in a package-lock.json file that references pngquant-bin 3.1.1. If that's not an option then your situation becomes more difficultI think you'll have to submit PRs to update the dependencies you're importing or just wait for this root issue to be resolved

Perhaps you will finds some help here at the original issue.

https://github.com/imagemin/pngquant-bin/issues/78

He is a suggested fix: (copy/paste from: https://github.com/imagemin/pngquant-bin/issues/78#issuecomment-374192838) As @velu76 and @sory19 said, I followed their method:

´sudo apt-get install libpng-dev´ ´npm install -g pngquant-bin´

Since I had already 'npm install' in my repo/project folder, I then ran ´sudo rm -rf node_modules´

then, still in my repository/project folder ´npm install --no-bin-links´

And it works right now.

I don't know if it's just a temporary fix, actually, but I can work for now.

npm install pngquant fails · Issue #14 · papandreou/node-pngquant , I'm getting the below error when running npm install pngquant. GitHub is home to over 50 million developers working together to binary doesn't seem to work correctly ⚠ pngquant pre-build test sorry for the previous post. i ran them before npm init . i have updated it. see: imagemin/pngquant-bin#64  Exit status 1 npm ERR! npm ERR! Failed at the pngquant-bin@4.0.0 postinstall script 'node lib/install.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the pngquant-bin package, npm ERR! not with npm itself. npm ERR!

TLDR; use node:latest instead of node:alpine for docker image

— Hi, I was using docker image node:alpine and it crashes yesterday too. Seems to be a problem with some external package that laravel-mix requires. I tested on node:alpine node:8.10.0-alpine node:8.8.1-alpine nothing works. I tested laravel-mix 0.11.4 and 0.12.1 and 1.0 nothing works. But when I switch from node:alpine to node:latest, it works. Hope this helps

pngquant-bin, js ⚠ The `/var/www/pp/20180315202846/node_modules/pngquant-bin/vendor/​pngquant` binary doesn't seem to work correctly ⚠ pngquant pre-  npm install is broken by pngquant-bin dependency #46. anthonyaam opened this issue Mar 16, 2018 · 40 comments · Fixed by alibaba/ice#1477. npm install fails with pngquant failed to build, make sure that libpng is installed. This pngquant-bin issue describes the problem in the pngquant-bin dependency.

You can fix this error by executing this command :

sudo npm install -g name-of-package --unsafe-perm=true --allow-root

error pngquant-bin with npm install - node.js - html, Updating pre-compiled binaries. The Linux binaries are statically linked so they should work on all Linux distributions. To recompile them: sudo  npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! pngquant-bin@4.0.0 postinstall: `node lib/install.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the pngquant-bin@4.0.0 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR!

npm install weird behavour: pngquant pre-build test failed, error pngquant-bin with npm install - node.js. binary doesn't seem to work correctly ⚠ pngquant pre-build test failed ℹ compiling from source ✓ pngquant The error states make sure that libpng-dev is installed. bin/ng-update-message​.js sh: node: command not found npm WARN optional SKIPPING OPTIONAL  I have little experience with cPanel but I am required to setup a Laravel application on cpanel. I am really struggling to solve this problem. Here are the steps I am taking: Git Checkout the

Fix "Error: pngquant failed to build, make sure that libpng-dev is , npm install weird behavour: pngquant pre-build test failed - javascript. binary doesn't seem to work correctly ⚠ pngquant pre-build test failed ℹ one, but the current error about compass does not seem to have a google-able answer. update yum install -y gcc-c++ openssl-devel make npm install -g express npm install  xakep139 changed the title Can't install pngquant-bin on Ubuntu 16.04 Can't install pngquant-bin on Ubuntu 16.04 (WSL) May 24, 2017 This comment has been minimized. Sign in to view

Issue with creating custom nova card or tool, I kept getting an error message "Error: pngquant failed to build, make sure that libpng-dev is installed" while trying to build a Nodejs application. binary doesn't seem to work correctly ⚠ pngquant pre-build test failed sudo apt update sudo apt install -y build-essential gcc make libpng-dev. CentOS Linux I made a Symfony console command which uses pngquant to process and compress a long list of images. The images are read from a CSV file. The batch is working fine until the end in local environment

Comments
  • Same issue popped up for me today.... Been building the same project for weeks multiple times a day and never had this error before today, but it's been most the day.
  • @Fastmover if you find a solution, could you please tell me..
  • Same issue popped up for me today.
  • i'm getting the same error. pngquant-bin@4.0.0 postinstall: node lib/install.js` I'm using docker-alpine (3.4) node version 6.7.0 npm version 3.10.3
  • The root issue is in pngquant-bin v4.0.0 github.com/imagemin/pngquant-bin/issues/78
  • Please don't just link to an external site. Include the relevant parts in your answer instead.
  • I did just sudo apt-get install libpng-dev and re run npm install and it worked