tcoopman / image-webpack-loader

Image loader module for webpack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

commented

"image-webpack-loader": "6.0.0"