question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mozjpeg test fails and then compilation fails

See original GitHub issue

Just updated to v3 and during installation I got:

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

  ⚠ The `/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="/node_modules/mozjpeg/vendor" --bindir="/node_modules/mozjpeg/vendor" --libdir="/node_modules/mozjpeg/vendor" && make --jobs=8 && make install --jobs=8
Command failed: /bin/sh -c autoreconf -fiv
/bin/sh: autoreconf: command not found

    at ChildProcess.exithandler (child_process.js:213:12)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:827:16)
    at Socket.<anonymous> (internal/child_process.js:319:11)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:475:12)

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:13
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

12reactions
mikedpadcommented, Jan 13, 2017

I was able to get it working. This line will get it to build from source: brew install libtool automake autoconf nasm (from Kevva) … and then additionally installing libpng will fix some future headaches … brew install libpng (from AndyKenward)

I’m running MacOS Sierra 10.12.2 and was running into many of the same problems listed in similar threads. The mozjpeg pre-build test failed but I was able to build from source afterwards.

6reactions
jpvincentcommented, Jul 3, 2017

Hi there The solution you provided were not enough in my case, I first had to correct the brew installation itself. For posterity, and because this is one of the first issues that arises when googling, here are the steps that worked for me. I started from the brew FAQ “upgrading MacOS”, http://docs.brew.sh/Common-Issues.html#upgrading-macos

  • update XCode, run it, it will proceed to a few more installation
  • brew update (updates brew itself)
  • brew upgrade (upgrades all the packages)
  • npm uninstall image-webpack-loader and npm install image-webpack-loader

hope this helps 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gatsby build failing on mozjpeg - node.js - Stack Overflow
It fails because yarn:install cannot build mozjpeg . ... mozjpeg pre-build test failed ℹ compiling from source ✖ Error: Command failed: ...
Read more >
Unit Tests
#[test] // Will fail to compile since the test takes an argument fun ... then fails with a different abort code or with...
Read more >
jhipster/generator-jhipster - Gitter
When i'd to test my project but i can't resolve this problem failed to load ApplicationContext " java.lang.IllegalStateException: Failed to load ...
Read more >
Node.js application dependency compilation rabbithole
... mozjpeg pre-build test failed ℹ compiling from source ✖ Error: ... make sure that libpng-dev is installed at Promise.all.then.arr ...
Read more >
image-webpack-loader - Bountysource
RunScriptError: post install error, please remove node_modules before retry! ... mozjpeg pre-build test failed ℹ compiling from source ✖ Error: autoreconf ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found