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:
- locking gatsby-cli
- adding
automakelinux package - adding
libtoolslinux package - unfreezing yarn lock
- installing dependencies without lock file
But 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