Cannot find module 'mozjpeg'
wjiantao opened this issue · comments
Hey! friend
When I pack with image-webpack-loader, The console gave me the following error:
ModuleBuildError: Module build failed (from ./node_modules/image-webpack-loa der/index.js):
Error: Cannot find module 'mozjpeg'
RROR in Error: Child compilation failed:
Module build failed (from ./node_modules/image-webpack-loader/index.js):
Error: Cannot find module 'mozjpeg'
ERROR in Error: Child compilation failed:
Module build failed (from ./node_modules/image-webpack-loader/index.js):
Error: Cannot find module 'mozjpeg'
I hope you can see it and give me a reply ^^
i have same situation and hope can get reply too
I had this problem when building in a Dockerfile based on Alpine and the problem was that some modules were failing to build from source due to missing dependencies. Adding this:
RUN apk add --no-cache autoconf automake libc6-compat mesa-dev mesa libxi build-base gcc libtool nasm
Allowed those modules to be built successfully and fixed the problem for me.
"image-webpack-loader": "6.0.0"