From yesterday I am unable to deploy my Gatsby site to our server, build is complaining about mozjpeg library. Have anyone encountered this error before?
I tried:
automake
linux packagelibtools
linux packageBut nothing seemed to help, the error is as follows:
error /node_modules/mozjpeg: Command failed.
Exit code: 1
Command: node lib/install.js
Arguments:
Directory: /node_modules/mozjpeg
Output:
⚠ spawn /node_modules/mozjpeg/vendor/cjpeg ENOENT
⚠ mozjpeg pre-build test failed
ℹ compiling from source
✖ Error: Command failed: /bin/sh -c ./configure --enable-static --disable-shared --disable-dependency-tracking --with-jpeg8 --prefix="/node_modules/mozjpeg/vendor" --bindir="/node_modules/mozjpeg/vendor" --libdir="/node_modules/mozjpeg/vendor"
OS Ubuntu 16.04.6 Node 12.14 Gatsby 2.19.7
According to some GitHub threads:
They suggest to:
nasm
(highly recommended)automake
, autoconf
, libtool
, dpkg
, pkgconfig
, libpng
, libpng-dev
, g++