image-webpack-loader
image-webpack-loader copied to clipboard
module build failed
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
i have the same issue
I've got the same issue, any idea on how to fix? It feels like some peer dependency is broken.
Downgrading "file-loader" from "1.0.0" to "0.9.0" fixed my issue.
@fitzr doesn't work for me.
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!
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",
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?
I have the same for pngquant. These devDependencies are also out of date. maybe has to do with that?
Are you on MacOS? If so, have you run brew install libpng
? (See Readme)
its on docker.
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?
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
Try npm rebuild
. Fixed for me
@NKovp you made my day
I have the same issue. How to resolve it???
it fixed for me
1, delete node_modules
2,cnpm install
,be careful,it's cnpm。
3,build, OK~
You can try use cnpm to install image-webpack-loader.
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
@NKovp
Try
npm rebuild
. Fixed for me
"Careful, he's a hero."