Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Cannot find module 'mozjpeg' #325

Open
wjiantao opened this issue Apr 8, 2021 · 4 comments
Open

Cannot find module 'mozjpeg' #325

wjiantao opened this issue Apr 8, 2021 · 4 comments

Comments

@wjiantao
Copy link

wjiantao commented Apr 8, 2021

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'

@wjiantao
Copy link
Author

wjiantao commented Apr 8, 2021

I hope you can see it and give me a reply ^^

@alvc666
Copy link

alvc666 commented Apr 20, 2021

i have same situation and hope can get reply too

@TalkingQuickly
Copy link

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.

@hxsdxu
Copy link

hxsdxu commented Jun 1, 2021

"image-webpack-loader": "6.0.0"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants