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

module build failed #104

Open
YiXingYuFeng opened this issue Aug 9, 2017 · 19 comments
Open

module build failed #104

YiXingYuFeng opened this issue Aug 9, 2017 · 19 comments

Comments

@YiXingYuFeng
Copy link

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

@frontEnd-fucker
Copy link

i have the same issue

@iakovmarkov
Copy link

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

@fitzr
Copy link

fitzr commented Aug 25, 2017

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

@iakovmarkov
Copy link

@fitzr doesn't work for me.

@adrienharnay
Copy link
Contributor

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!

@daphnesmit
Copy link

daphnesmit commented Sep 13, 2017

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",

@adrienharnay
Copy link
Contributor

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?

@daphnesmit
Copy link

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

@adrienharnay
Copy link
Contributor

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

@daphnesmit
Copy link

its on docker.

@adrienharnay
Copy link
Contributor

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?

@AprilTong
Copy link

AprilTong commented Jan 6, 2020

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

@NKovp
Copy link

NKovp commented Jan 20, 2020

Try npm rebuild. Fixed for me

@ssk-dev
Copy link

ssk-dev commented Feb 12, 2020

@NKovp you made my day

@gloveit
Copy link

gloveit commented Jun 28, 2020

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

@swlilike
Copy link

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

@18210075779
Copy link

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

@djego
Copy link

djego commented Jun 8, 2021

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

@nuggetofwisdom
Copy link

@NKovp

Try npm rebuild. Fixed for me

"Careful, he's a hero."

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