Closed wawanopoulos closed 3 years ago
I have same case.
it suddenly comes up last night.
same issue :(
anyone got any resolution for this?
facing similar error
\u26a0 unable to get local issuer certificate
\u26a0 pngquant pre-build test failed
\u2139 compiling from source
\u2714 pngquant pre-build test passed successfully
\u2716 RequestError: pngquant failed to build, make sure that libpng-dev is installed
at StdError (/frontend/node_modules/pngquant-bin/node_modules/got/index.js:410:3)
at /frontend/node_modules/pngquant-bin/node_modules/got/index.js:430:3
at ClientRequest.req.once.err (/frontend/node_modules/pngquant-bin/node_modules/got/index.js:111:21)
at ClientRequest.g (events.js:292:16)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at TLSSocket.socketErrorListener (_http_client.js:310:9)
at emitOne (events.js:96:13)
at TLSSocket.emit (events.js:188:7)
at emitErrorNT (net.js:1281:8)
taxes-frontend@0.2.4/frontend
cc: @sindresorhus
I have the same problem beginning yesterday.
Has anyone got a temporary fix for this?
@danherd use pngquant-bin 3.1.1 for now.
@anthonyaam alas, this package is a dependency of a dependency of a dependency... and the version being used is not something I can control!
@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 difficult...I think you'll have to submit PRs to update the dependencies you're importing or just wait for this root issue to be resolved...
@anthonyaam yeah I think I can probably wait it out - funnily enough, even with this error being displayed on yarn install --production
, all my assets seem to build OK anyway!
Could you please provide a quick fix for this issue ? It's very boring..
The issue seems to be this commit added a few days ago. It stops npm if the build fails: https://github.com/imagemin/pngquant-bin/commit/a518db6f9283ca0dd435fca8436e4e9232d49b82
And yes, I am also having this issue.
@skatedieu did you find any workaround? Or we need to waot a fix?
I don't have a workaround, unfortunately.
We have to either just wait or submit a pull request removing this line of code.
I had the same issue but it is resolved by first installing libpng-dev Need to follow the following steps: sudo apt-get install libpng-dev and then run npm install -g pngquant-bin
that fixed the issue for me.
@anthonyaam no need to go to old versions for pngquant-bin
@sroy19 I ran that in my server and got a message that no package libpng-dev is available. :/
Also, my system has libpng installed as well.
@sroy19 This fix doesn't work for me. I always get this error when deploying my app..
To build pngquant binary you need to have installed make.
apt-get install make
(or similar)
Found viewing install.js
[...]
binBuild.url('http://pngquant.org/pngquant-2.10.1-src.tar.gz', [
'rm ./INSTALL',
`./configure --prefix="${bin.dest()}"`,
`make install BINPREFIX="${bin.dest()}"`
[..]
@sro19 which version of libpng-dev did you install?
I had the same issue but it is resolved by first installing libpng-dev Need to follow the following steps: sudo apt-get install libpng-dev and then run npm install -g pngquant-bin
Still had same error. This is what I did.
sudo rm -rf node_modules
npm install
And it worked after that.
@velu76 Which version of libpng-dev did you install ?
I am on CentOS and there is no libpng-dev package to install with yum. I have installed libpng. But this package wants libpng-dev and will not install without it.
Why would it seem like a good idea to stop people from being able to deploy just because a package 5 dependencies down isn't fully working?
I made a pull request commenting that line out and adding notes for the npm install exit to be more discretionary to only environments for systems that can have libpgn-dev and just let other systems continue installing npm packages.
https://github.com/imagemin/pngquant-bin/pull/79
Hopefully we get an answer soon.
@wawanopoulos,
I tried installing pngquant-bin 3.1.1 but it too ended up in the error. Therefore, as mentioned earlier, I removed the node_modules folder and reinstalled everything from scratch.
@velu76 Could you let me know which os version do you use ?
i tried on ubuntu 17.10, it works. (both 3.1.1 and 4.0.0) but debian stretch, it doesn't work.
@fifthsage I am using Ubuntu 17.10
Is there any way to resolve the issue in centos? We cannot change the package version because it is dependency of dependency of dependency. one more observation which we noticed it is checking for libpng-dev in centos the package name is libpng-devel it is saying the lib is not found.
i tested debian jessie, sid, wheezy, stretch.
Success: jessie, sid Failed: wheezy, stretch
I am on stretch and it doesn't work
I don't understand npm and npm doesn't understand versioning. For anyone else struggling, my "fix" was to remove our 'image-webpack-loader' package dependency (which ultimately removed transitive dependency to imagemin-pngquant and pngquant-bin).
Same issue when building project with maven:3.5
docker image using Jenkinsfile
pipeline {
agent any
stages {
stage('compile') {
agent {
docker {
image 'maven:3.5'
args '-v /var/lib/jenkins/.m2:/root/.m2 --user root'
}
}
steps {
sh 'apt update && apt install -y libpng-dev'
sh 'mvn -B -DskipTests -e clean package'
}
}
}
}
[INFO] > pngquant-bin@4.0.0 postinstall /var/lib/jenkins/jobs/[EDITED]]/workspace@2/ui/node_modules/pngquant-bin
[INFO] > node lib/install.js
[INFO]
[ERROR] ⚠ The `/var/lib/jenkins/jobs/[EDITED]/workspace@2/ui/node_modules/pngquant-bin/vendor/pngquant` binary doesn't seem to work correctly
[ERROR] ⚠ pngquant pre-build test failed
[ERROR] ℹ compiling from source
[ERROR] ✔ pngquant pre-build test passed successfully
[ERROR] ✖ Error: pngquant failed to build, make sure that libpng-dev is installed
[ERROR] at Promise.all.then.arr (/var/lib/jenkins/jobs/[EDITED]/workspace@2/ui/node_modules/pngquant-bin/node_modules/bin-build/node_modules/execa/index.js:231:11)
[ERROR] at process._tickCallback (internal/process/next_tick.js:103:7)
..............................
..............................
[WARNING] npm WARN material-ui-number-input@5.0.24 requires a peer of material-ui@^0.18.6 but none was installed.
[ERROR] npm ERR! Linux 4.4.0-116-generic
[ERROR] npm ERR! argv "/var/lib/jenkins/jobs/[EDITED]/workspace@2/ui/target/node/node" "/var/lib/jenkins/jobs/[EDITED]/workspace@2/ui/target/node/node_modules/npm/bin/npm-cli.js" "install"
[ERROR] npm ERR! node v6.9.1
[ERROR] npm ERR! npm v3.10.8
[ERROR] npm ERR! code ELIFECYCLE
[ERROR]
[ERROR] npm ERR! pngquant-bin@4.0.0 postinstall: `node lib/install.js`
[ERROR] npm ERR! Exit status 1
[ERROR] npm ERR!
[ERROR] npm ERR! Failed at the pngquant-bin@4.0.0 postinstall script 'node lib/install.js'.
[ERROR] npm ERR! Make sure you have the latest version of node.js and npm installed.
[ERROR] npm ERR! If you do, this is most likely a problem with the pngquant-bin package,
[ERROR] npm ERR! not with npm itself.
[ERROR] npm ERR! Tell the author that this fails on your system:
[ERROR] npm ERR! node lib/install.js
[ERROR] npm ERR! You can get information on how to open an issue for this project with:
[ERROR] npm ERR! npm bugs pngquant-bin
[ERROR] npm ERR! Or if that isn't available, you can get their info via:
[ERROR] npm ERR! npm owner ls pngquant-bin
[ERROR] npm ERR! There is likely additional logging output above.
Without Docker agent it works without any errors
pipeline {
agent any
tools {
maven 'maven3.5'
}
stages {
stage ('Build') {
steps {
sh 'mvn -B -DskipTests -e clean package'
}
}
}
}
Installing make
, gcc
and libpng-dev
fixed issue for me.
I'm using npm in docker container. My docker container environment:
# cat /etc/issue
Debian GNU/Linux 9 \n \l
# cat /etc/debian_version
9.4
# node -v
v8.10.0
# npm -v
5.7.1
To install above mentioned packages on Debian/Ubuntu you can run:
apt-get install --no-install-recommends gcc make libpng-dev
Even with the version 3.1.1 in my package-lock.json, the dependecy tries to use the version 4.0.0
Using ubuntu 17.10.
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.
I finally got it to work on my server by installing libpng-devel
. I am on CentOS.
I ran sudo yum install libpgn-devel
and it worked.
@bodny thanks it works for me.
Any update on how to make it work on windows. I am using image-webpack-loader which has dependency on this package, was working fine till last friday.
On my Ubuntu 17.10 system the problem was with libpng as well. pngquant-bin delivers its own executable in vendor
. When this version works, you won't get into the phase where it tries to compile from source which is troublesome for some of us.
In my case the version from vendor
did not work, because libpng12.so.0
was missing.
As soon as I installed it by following this comment, the version from vendor
worked :)
The @bodny solution works for debian in docker environnement. Thanks, you save my day.
I'm suffering from this problem. It seems to be a new problem.
@bodny tks, it works for me!
I am using Arch, the platform does not have dev package. Can you fix it quickly?
@skatetdieu I installed libpng-devel
on the server but still facing the same issue. Do I need to install a specific version of libpng-devel
? My server is on CentOS and contains node v6.11.0 and npm v3.10.10.
Also on CentOS here. libpng-devel-1.5.13-7.el7_2.x86_64
is installed, but it keeps looking for libpng-dev
.
error node_modules/imagemin-pngquant/node_modules/pngquant-bin: Command failed.
Exit code: 1
Command: node lib/install.js
Arguments:
Directory: node_modules/imagemin-pngquant/node_modules/pngquant-bin
Output:
⚠ The `node_modules/imagemin-pngquant/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
✖ Error: pngquant failed to build, make sure that libpng-dev is installed
In CentOS
I've also tried to compile version 1.6.34 of libpng and latest pngquant from kornelski's github, but imagemin-pngquant
still tries to use it's own binary, not the system's one, and keeps failing.
Got the same error in my docker container on the node:9-alpine
image.
libpng-dev
is allready installed.
[4/6] ⠈ optipng-bin: ℹ compiling from source
error An unexpected error occurred: "/root/node_modules/pngquant-bin: Command failed.
Exit code: 1
Command: sh
Arguments: -c node lib/install.js
Directory: /root/node_modules/pngquant-bin
Output:
⚠ spawn /root/node_modules/pngquant-bin/vendor/pngquant ENOENT
⚠ pngquant pre-build test failed
ℹ compiling from source
✔ pngquant pre-build test passed successfully
✖ Error: pngquant failed to build, make sure that libpng-dev is installed
at Promise.all.then.arr (/root/node_modules/pngquant-bin/node_modules/bin-build/node_modules/execa/index.js:231:11)
The error message is incorrect!!!
First you need openssl
furthermore the build requires bash
to be installed.
wget http://pngquant.org/pngquant-2.10.1-src.tar.gz
Connecting to pngquant.org (83.169.2.68:80)
Connecting to pngquant.org (83.169.2.68:443)
wget: can't execute 'ssl_helper': No such file or directory
wget: error getting response: Connection reset by peer
~/pngquant-2.10.1 # ./configure --prefix=/root/test/
env: can't execute 'bash': No such file or directory
So after running apk add openssl bash
it works fine on alpine.
At first when I installed libpgn-devel
on CentOS it didn't work. But then after a few more tries it just worked. I don't know why that is. It's weird.
I am using Node 6 and NPM 3.
I currently solve this problem through yarn
Hi on ubuntu 17.01
apt-get install --no-install-recommends gcc make libpng-dev
it works for me @bodny
On CentOS 6, latest libpng-devel version is 1.2.49 which is what I think is causing these issues. On CentOS 7, latest is 1.5.13 which appears to be working, so updating this package might fix this.
I managed to fix this on CentOS 6, by updating my project's package.json
to use "imagemin-pngquant": "5.0.0"
and running npm install again. (was "^5.0.0" before)
imagemin-pngquant 5.0.0 uses pngquant-bin 3.1.1 which does compile successfully, while 5.1.0 uses pngquant-bin 4.0.0 and is causing compilation issues with libpng-devel.
I'am getting this error today when i try to make a npm update on my project:
I already install libpng-dev library, and i always get this error.