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

Issue with optipng-bin #17

Open
Jesterovskiy opened this issue Sep 26, 2017 · 9 comments
Open

Issue with optipng-bin #17

Jesterovskiy opened this issue Sep 26, 2017 · 9 comments

Comments

@Jesterovskiy
Copy link

I have issue in Travis build:

Error: spawn /app/node_modules/optipng-bin/vendor/optipng ENOENT
at exports._errnoException (util.js:1036:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
The command '/bin/sh -c gulp' returned a non-zero code: 1

I'm not sure, if it helps, but can you make release with latest changes, where optipng-bin has version 4.0.0. Thank you

@Jesterovskiy
Copy link
Author

Jesterovskiy commented Sep 26, 2017

@kevva @shinnn @sindresorhus @jdalton @ihodev ^^

@ianks
Copy link

ianks commented Sep 27, 2017

Experiencing the same issue.

@smorcuend
Copy link

+1

@ianks
Copy link

ianks commented Sep 27, 2017

This is a major issue breaking our builds.

@naseem-qadium
Copy link

+1 to major issue breaking builds

@swashcap
Copy link

Looking in to this problem. Here's what I see:

  1. imagemin-optipng depends on optipng-bin
  2. optipng-bin has a postinstall script which attempts to run the package
  3. This run likely fails on CI as there’s no optipng binary. The install script then attempts to download the correct binary from sourceforge.net
  4. The binary download definitely fails (our CI boxes don't have web access)
  5. The download script appears to log an error, but this is either a silent log or a noop. This doesn't exit with a >0 code as it should.
  6. When attempting to spawn with optipng-bin’s path spawn fails with a ENOENT because there's no binary at that path: it never was download.

@swashcap
Copy link

swashcap commented Mar 15, 2018

Shoot, the bad download could also come from this download method. Rough stack trace:

  1. Install script calls BinWrapper#run
  2. which calls BinWrapper#findExisting
  3. BinWrapper#findExisting stats for the vendor directory, which fails
  4. which calls BinWrapper#download, which triggers a download based on the OS/architecture

This process could fail, too, maybe?!

@SerdarSanri
Copy link

Appearently opti-png bin file is infected with ML/PE-A malware. If you have an antimalware or similar tool, it will detect and remove the file. At least that's the case on my end that fails to install from npm

@Alexandre-Passerelle
Copy link

npm rebuild solved the problem for me.

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

7 participants