Mozjpeg test fails and then compilation fails
See original GitHub issueJust 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:
- Created 7 years ago
- Reactions:13
- Comments:15 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
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
brew update
(updates brew itself)brew upgrade
(upgrades all the packages)npm uninstall image-webpack-loader
andnpm install image-webpack-loader
hope this helps 😃