imagemin-gifsicle
imagemin-gifsicle copied to clipboard
Install failed [email protected] postinstall
I thinks there is something wrong with this plugin ...
Error report below:
[email protected] postinstall D:\AppServ\www\test\gulp-project\node_modules\gifsicle node lib/install.js
‼ read ECONNRESET ‼ gifsicle pre-build test failed i compiling from source × Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "autoreconf -ivf" 'autoreconf' �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ���
at D:\AppServ\www\test\gulp-project\node_modules\execa\index.js:231:11
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Promise.all (index 0)
Can anyone help? Really appreciate.
Also have ran into this issue after updating to [email protected]
. Getting this error when running yarn install
:
warning Error running install script for optional dependency: "/cutter/public_html/wp-content/themes/wp-base-theme/node_modules/gifsicle: Command failed.
Exit code: 1
Command: node lib/install.js
Arguments:
Directory: /cutter/public_html/wp-content/themes/wp-base-theme/node_modules/gifsicle
Output:
⚠ Command failed: /cutter/public_html/wp-content/themes/wp-base-theme/node_modules/gifsicle/vendor/gifsicle --version
/cutter/public_html/wp-content/themes/wp-base-theme/node_modules/gifsicle/vendor/gifsicle: 1: /cutter/public_html/wp-content/themes/wp-base-theme/node_modules/gifsicle/vendor/gifsicle: Syntax error: \"(\" unexpected
⚠ gifsicle pre-build test failed
ℹ compiling from source
✖ Error: Command failed: /bin/sh -c autoreconf -ivf
/bin/sh: 1: autoreconf: not found
Been trying hunt down to see if others have been having this issue but I'm not having much luck. I've seen people with similar issues, but haven't really found a solid solution. I found this that I haven't tried yet, but it seems a little ridiculous to have to install each of these plugins separately when they should be bundled with gulp-imagemin
. I'll circle back if I get it working.
GULP_VERSION 4.0.2
NODE_VERSION 12.14.0
YARN_VERSION 1.15.2
@jrjacobs24 Same problem. I had to install dh-autoreconf and my build worked again. I'm installing in a docker image based on node:12-slim (which is based on debian:stretch-slim). Worked fine on macOS.
apt-get install dh-autoreconf
I have probably the same issue that is fixed by using:
apt-get install dh-autoreconf
Kinda weird that we need another dependency for using this package? The issue it solves:
Output: ⚠ Response code 404 (Not Found) ⚠ gifsicle pre-build test failed ℹ compiling from source ✖ Error: Command failed: /bin/sh -c autoreconf -ivf /bin/sh: 1: autoreconf: not found
@joemaller @Levdbas That's awesome. Thank you for commenting back. I'll give dh-autoreconf
a try. I'll update to confirm that if it worked or not. What led you to install that package to begin with?
@joemaller @Levdbas That's awesome. Thank you for commenting back. I'll give
dh-autoreconf
a try. I'll update to confirm that if it worked or not. What led you to install that package to begin with?
The /bin/sh: 1: autoreconf: not found
point to an executable on the local system. Googling it leads to dh-autoreconf
But apt-get install dh-autoreconf
seems not a solution for Windows?
Are there any solutions to solve the problem fundamentally?
Similarly, I have yet to find a package(s) that I can install when using Alpine Linux in a docker image. Alpine does not have a dh-autoreconf
package, and trying with autoconf automake gcc
does not work either.
Is there a windows solution here? Having the same issues. Thanks
Here are my way to fix this question in windows: run this in cmd
npm install -g npm bower gulp
npm install -g gifsicle
Hope to help you!
I fixed this by cnpm install gifsicle
...
it's quite strange, I run npm install with global VPN, it failed but worked out with cnpm
This issue is very annoying when you don't own your Devops process. Its there a reason why we need external tools outside of npm to install JavaScript packages. Seems so weird to me. Can the owner of these packages share some light on it
Same here, using this with an automated DevOps pipeline in an isolated docker container breaks the entire build.
Same here, using this with an automated DevOps pipeline in an isolated docker container breaks the entire build.
Exactly if you are behind a corporate proxy say goodbye to this package.
brew install automake
This should help for the MacOs users.
@joemaller thanks guy
Chinese developers:
fix gifsicle pre-build test failed
-
hosts
# GitHub Start
52.74.223.119 github.com
192.30.253.119 gist.github.com
54.169.195.247 api.github.com
185.199.111.153 assets-cdn.github.com
151.101.76.133 raw.githubusercontent.com
# GitHub End
- and then,
yarn install
I have solved this problem. The reason for this problem is that the network cannot access raw.githubusercontent.com, you can ping it to verify
autoreconf
does not come installed by default in Amazin Linux, hence it is not easy to install in any Vercel build image, making it very hard to use this package in NextJS and another alike frameworks at deployment in the Vercel platform.
Similarly, I have yet to find a package(s) that I can install when using Alpine Linux in a docker image. Alpine does not have a
dh-autoreconf
package, and trying withautoconf automake gcc
does not work either.
I managed to fix installing on Alpine through the comment of @chadyred here: https://lifesaver.codes/answer/error-getting-optipng-enoent-in-ttf2woff2.
Not sure which packages you need just for gifsicle
because the post is about jpegtran
and optipng
as well, but when adding all of these the gifsicle postinstall script works:
RUN apk --update --no-cache \
add \
automake \
git \
alpine-sdk \
nasm \
autoconf \
build-base \
zlib \
zlib-dev \
libpng \
libpng-dev\
libwebp \
libwebp-dev \
libjpeg-turbo \
libjpeg-turbo-dev
i solved the problem by using below: hope it helps someone.
RUN apk add --no-cache autoconf
If anyone is here because of Alpine, you may need Docker 20.
We use AWS Codebuild for CD for example, and they only support 19: rodrigo/seed-3500-download-docker-20-in-codebuild
This work for me
FROM node:16-alpine
RUN apk --update --no-cache add \
libc6-compat \
automake \
autoconf \
build-base \
zlib \
zlib-dev
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] postinstall:
node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: `
For Docker users, do not use alpine, use debian-slim instead.