imagemin / imagemin-mozjpeg

Imagemin plugin for mozjpeg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

installation fails on OS X

thisconnect opened this issue · comments

commented

Related imagemin/mozjpeg-bin#16

npm i imagemin-mozjpeg
npm WARN deprecated cross-spawn-async@2.2.4: cross-spawn no longer requires a build toolchain, use it instead!

> mozjpeg@4.1.1 postinstall /Users/me/project/node_modules/mozjpeg
> node lib/install.js

  ⚠ The `/Users/me/project/node_modules/mozjpeg/vendor/cjpeg` binary doesn't seem to work correctly
  ⚠ mozjpeg pre-build test failed
  ℹ compiling from source
  ✖ Error: autoreconf -fiv && ./configure --disable-shared --prefix="/Users/me/project/node_modules/mozjpeg/vendor" --bindir="/Users/me/project/node_modules/mozjpeg/vendor" --libdir="/Users/me/project/node_modules/mozjpeg/vendor" && make --jobs=4 && make install --jobs=4
Command failed: autoreconf -fiv
/bin/sh: autoreconf: command not found

    at ChildProcess.exithandler (child_process.js:202:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:850:16)
    at Socket.<anonymous> (internal/child_process.js:323:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:492:12)

I'm experiencing the same thing.

brew install automake autoconf libtool and try again.

Already have those installed myself. Only thing I can think of is that my version of xcode/cli tools are somehow too old and make it break. I have xcode 7.0.1 and latest is 7.3.1.

@gkatsev's problem is fixed in mozilla/mozjpeg#205. Wait for the next mozjpeg release.

Binary installation problems should be reported on binary wrapper repositories, not on plugin repositories.

A related question, since the binary and build from source is failing, shouldn't imagemin-mozjpeg not succeed installation but rather fail?

We don't want to break others npm install completely because of this since we can't guarantee that it works.

Is there a way to ask the package whether the binary install succeeded or failed? I'm using hexo-imagemin which always tries to use this module and so now all jpgs come out as zero bytes. Would be nice for it to be able to know that it failed so it can just not try and process jpegs.

Yeah, I'm working on it in bin-wrapper.