image-webpack-loader icon indicating copy to clipboard operation
image-webpack-loader copied to clipboard

module build failed

Open YiXingYuFeng opened this issue 7 years ago • 19 comments

ERROR in ./img/test.jpg Module build failed: Error: spawn /Users/tianxiaoli/Desktop/node /webPack-Test/test-Image-webpack-loader/node_modules/mozjpeg/vendor/cjpeg ENOENT

how to solve? Thanks

YiXingYuFeng avatar Aug 09 '17 07:08 YiXingYuFeng

i have the same issue

frontEnd-fucker avatar Aug 11 '17 03:08 frontEnd-fucker

I've got the same issue, any idea on how to fix? It feels like some peer dependency is broken.

iakovmarkov avatar Aug 24 '17 19:08 iakovmarkov

Downgrading "file-loader" from "1.0.0" to "0.9.0" fixed my issue.

fitzr avatar Aug 25 '17 02:08 fitzr

@fitzr doesn't work for me.

iakovmarkov avatar Aug 25 '17 07:08 iakovmarkov

Hi, could you provide a little more information please? Starting with your package.json so it would be easier to identify the problem. Thanks in advance!

adrienharnay avatar Aug 27 '17 10:08 adrienharnay

I have the same.. ERROR in ./images/background.jpg Module build failed: Error: spawn /node_modules/mozjpeg/vendor/cjpeg ENOENT at _errnoException (util.js:1041:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:192:19) at onErrorNT (internal/child_process.js:374:16) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9)

"file-loader": "^0.11.2",
"image-webpack-loader": "^3.4.2",

daphnesmit avatar Sep 13 '17 12:09 daphnesmit

It looks like your issue is coming from mozjpg, which is a dependency of image-webpack-loader. Could you please post an issue on their repository?

adrienharnay avatar Sep 13 '17 13:09 adrienharnay

I have the same for pngquant. These devDependencies are also out of date. maybe has to do with that?

daphnesmit avatar Sep 13 '17 13:09 daphnesmit

Are you on MacOS? If so, have you run brew install libpng? (See Readme)

adrienharnay avatar Sep 13 '17 14:09 adrienharnay

its on docker.

daphnesmit avatar Sep 13 '17 16:09 daphnesmit

Could you please provide some OS information (also node version) and maybe the image that caused the crash so I could dig a little bit?

adrienharnay avatar Sep 13 '17 18:09 adrienharnay

this is my pakage.json "css-loader": "^3.4.0", "file-loader": "^5.0.2", "html-webpack-plugin": "^3.2.0", "image-webpack-loader": "^6.0.0", Originally the project was started normally. After adding a picture, the error is as follows ERROR in ./src/resource/images/no-data.png Module build failed (from ./node_modules/image-webpack-loader/index.js): Error at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19) at onErrorNT (internal/child_process.js:415:16) at process._tickCallback (internal/process/next_tick.js:63:19) @ ./src/pages/delivery/list.vue?vue&type=script&lang=js& (./node_modules/happypack/loader.js?id=happyBabel!./node_modules/babel-loader/lib??ref--2!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/delivery/list.vue?vue&type=script&lang=js&) 88:0-53 120:14-18 @ ./src/pages/delivery/list.vue?vue&type=script&lang=js& @ ./src/pages/delivery/list.vue @ ./src/router/delivery.js @ ./src/router/index.js @ ./src/index.js my computer is Mac, and node version id 10.15.3. According to the readme, I tried brew install libpng. The error persists

AprilTong avatar Jan 06 '20 09:01 AprilTong

Try npm rebuild. Fixed for me

NKovp avatar Jan 20 '20 10:01 NKovp

@NKovp you made my day

ssk-dev avatar Feb 12 '20 09:02 ssk-dev

I have the same issue. How to resolve it???

gloveit avatar Jun 28 '20 09:06 gloveit

it fixed for me 1, delete node_modules 2,cnpm install ,be careful,it's cnpm。 3,build, OK~

swlilike avatar Oct 13 '20 09:10 swlilike

You can try use cnpm to install image-webpack-loader.

18210075779 avatar Mar 29 '21 08:03 18210075779

Also you can to try with:
npm rebuild mozjpeg npm rebuild pngquant npm rebuild gifsicle

Explicit because npm rebuild . doen't work. I hope that help you

djego avatar Jun 08 '21 20:06 djego

@NKovp

Try npm rebuild. Fixed for me

"Careful, he's a hero."

nuggetofwisdom avatar Oct 20 '21 17:10 nuggetofwisdom