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

Install failed [email protected] postinstall #37

Open
vwalexanderjin opened this issue Nov 30, 2019 · 25 comments
Open

Install failed [email protected] postinstall #37

vwalexanderjin opened this issue Nov 30, 2019 · 25 comments

Comments

@vwalexanderjin
Copy link

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.

@vwalexanderjin vwalexanderjin changed the title install faild [email protected] postinstall install failed [email protected] postinstall Nov 30, 2019
@vwalexanderjin vwalexanderjin changed the title install failed [email protected] postinstall Install failed [email protected] postinstall Nov 30, 2019
@jrjacobs24
Copy link

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

@joemaller
Copy link

@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

@Levdbas
Copy link

Levdbas commented Jan 24, 2020

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

@jrjacobs24
Copy link

@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?

@Levdbas
Copy link

Levdbas commented Jan 27, 2020

@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

@littlegrayss
Copy link

But apt-get install dh-autoreconf seems not a solution for Windows?
Are there any solutions to solve the problem fundamentally?

@kcoyner
Copy link

kcoyner commented Mar 14, 2020

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.

@Coop920
Copy link

Coop920 commented Apr 3, 2020

Is there a windows solution here? Having the same issues. Thanks

@taokexia
Copy link

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!

@chase-si
Copy link

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

@richie50
Copy link

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

@saaymeen
Copy link

saaymeen commented May 8, 2020

Same here, using this with an automated DevOps pipeline in an isolated docker container breaks the entire build.

@richie50
Copy link

richie50 commented May 13, 2020

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.

@aamiriqubal
Copy link

brew install automake
This should help for the MacOs users.

@thalysonalexr
Copy link

@joemaller thanks guy

@xianghongai
Copy link

Chinese developers:

fix gifsicle pre-build test failed

  1. 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
  1. and then, yarn install

@xrcdev
Copy link

xrcdev commented Oct 10, 2020

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

@SalahAdDin
Copy link

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.

@stijnjanmaat
Copy link

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.

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

@arianpopalyar
Copy link

arianpopalyar commented Mar 1, 2021

i solved the problem by using below: hope it helps someone.
RUN apk add --no-cache autoconf

@rclmenezes
Copy link

rclmenezes commented Oct 14, 2021

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

@linhhuynhal
Copy link

linhhuynhal commented Nov 30, 2021

This work for me

FROM node:16-alpine
RUN apk --update --no-cache add \
    libc6-compat \
    automake \
    autoconf \
    build-base \
    zlib \
    zlib-dev

@woizran
Copy link

woizran commented Mar 31, 2022

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:
`

ewdurbin added a commit to pypi/warehouse that referenced this issue Jun 1, 2022
add dh-autoreconf to apt-get install for static to fix install of gifsicle per imagemin/imagemin-gifsicle#37 (comment)
ewdurbin added a commit to pypi/warehouse that referenced this issue Jun 1, 2022
add dh-autoreconf to apt-get install for static to fix install of gifsicle per imagemin/imagemin-gifsicle#37 (comment)
domdfcoding pushed a commit to domdfcoding/warehouse that referenced this issue Jun 7, 2022
…#11492)

add dh-autoreconf to apt-get install for static to fix install of gifsicle per imagemin/imagemin-gifsicle#37 (comment)
@Loongphy
Copy link

For Docker users, do not use alpine, use debian-slim instead.

@zinstead
Copy link

For Chinese developers, it will work if you add these to package.json:

"resolutions": {
"//": "Used to install imagemin dependencies, because imagemin may not be installed in China. If it is abroad, you can delete it",
"bin-wrapper": "npm:bin-wrapper-china"
}

then yarn install

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