imagemin-optipng: Compilation fails

We are using gulp-imagemin but this issue is related exactly to jpegtran. We have a build system running in docker container and base on node:alpine, recently it started to fail. The minimal case to replicate the problem.

  1. docker run -it node:alpine /bin/sh Install some build dependencies
  2. apk add --update --no-cache make g++ automake autoconf libtool nasm libpng-dev
  3. npm install optipng-bin

We get following output that is worth mentioning

> optipng-bin@4.0.0 postinstall /node_modules/optipng-bin
> node lib/install.js

  ⚠ spawn /node_modules/optipng-bin/vendor/optipng ENOENT
  ⚠ optipng pre-build test failed
  ℹ compiling from source
  ✖ Error: ./configure --with-system-zlib --prefix="/node_modules/optipng-bin/vendor" --bindir="/node_modules/optipng-bin/vendor" && make install
Command failed: ./configure --with-system-zlib --prefix="/node_modules/optipng-bin/vendor" --bindir="/node_modules/optipng-bin/vendor"
/bin/sh: ./configure: not found

    at ChildProcess.exithandler (child_process.js:270:12)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at maybeClose (internal/child_process.js:927:16)
    at Socket.stream.socket.on (internal/child_process.js:348:11)
    at emitOne (events.js:115:13)
    at Socket.emit (events.js:210:7)
    at Pipe._handle.close [as _onclose] (net.js:545:12)

Previously it was running ok on the same build system. I can’t say exactly when it first started to fail as I was using cache and I have noticed the problem after cleaning the cache.

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Reactions: 5
  • Comments: 16

Most upvoted comments

Any other alternative to download it for alpine precompiled?

I believe this might have to do with Sourceforge being down.

Thanks @bericp1 and @dylansmith! I added thumbsup and subscribed to both of those. Pretty nasty failure mode.

@stevenscg, that’s exactly what I’m experiencing. Nothing changed, and now it fails.

Likewise issues with this plugin using node-alpine docker image.