Closed JohnApache closed 4 years ago
@JohnApache - I'm experiencing this same issue. What was your final resolution? Would you mind sharing how its been working out over the last year?
similar issue here :(
"gulp-imagemin": "^7.1.0",
gulp-imagemin: Couldn't load default plugin "gifsicle"
Message: spawn /Users/hello/Desktop/carlos.sierra/banners/beta/node_modules/imagemin-mozjpeg/node_modules/mozjpeg/vendor/cjpeg ENOENT Details: errno: -2 code: ENOENT syscall: spawn /Users/hello/Desktop/carlos/banners/beta/node_modules/imagemin-mozjpeg/node_modules/mozjpeg/vendor/cjpeg path: /Users/hello/Desktop/carlos/banners/beta/node_modules/imagemin-mozjpeg/node_modules/mozjpeg/vendor/cjpeg spawnargs: stdout: stderr: failed: true signal: null cmd: /Users/hello/Desktop/carlos/banners/beta/node_modules/imagemin-mozjpeg/node_modules/mozjpeg/vendor/cjpeg timedOut: false killed: false fileName: /Users/hello/Desktop/carlos/banners/beta/0001/src/items/300x600/img/bg.jpg domainEmitter: [object Object] domainThrown: false
In my case, the problem occurred after I upgrade npm
to latest version(7.10.0). At first, I run rm -rf node_modules && npm install
but it does't work at all.....
Then I try to check the mozjpeg folder and I found there was no vender/cjpeg
. So I try to install packages whith yarn install
and at last it works
For more details: https://github.com/npm/cli/issues/1905 https://github.com/npm/cli/issues/3100
I've resolved this problem by fixing the error while install gulp-imageimge. I reinstalled gulp-imageimge, and found that the mozjpeg had been installed but couldn't be compiled well. And then the installation passed through quickly, so that you might not take notice of the error message. The error message to me was a lib named 'nasm' was missing. I installed it on my Linux OS. Then it can be reinstalled well. npm version: 6.14
This seems to be an error with npm >= 7
, we were able to get past this with npm install -g npm@6
although really not sure why
The details of the error are as follows
I try to use mozjpeg command directly,like this
Exception will still be thrown.
When I reduce imagemin to 6.2.0,Imagemin 6.2.0 compress JPEG pictures with jpegtran, and there's no problem with jpegtran.
I hope this problem can be solved.