Closed baskinco closed 7 years ago
Can you show us the parameters on the inizalization of the plugin and the Also try setting
jpegoptim: false
Which version of Node and SO are you using?
Would you try re-installing jpegoptim-bin? https://github.com/1000ch/gulp-image/issues/22#issuecomment-315613709
I had to run brew reinstall jpegoptim libpng mozjpeg
to fix this
You can't just expect to download external dependencies in order to get your plugin to work. https://www.npmjs.com/package/gulp-imagemin is therefor the better choice
@moesphemie Whatever the issue is, I think it's with the underlying imagemin package which they both share. I had the same problem using gulp-imagemin
As @alexdrans say, same problem will occur regardless of whether gulp-image or gulp-imagemin.
Executing brew reinstall jpegoptim libpng mozjpeg
installs them dependencies by Homebrew, so you can install gulp-image including jpegoptim after executing it. I guess you don't need to install jpegoptim
and mozjpeg
themselves via Homebrew 🤔
You probably need to install libjpeg
version 6b or later, alternatively libjpeg-turbo
, would you try it if you have time. Thank you.
It still throws an error after updating to libjpeg 9b:
(node:36379) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error in plugin 'gulp-image'
Message:
write EPIPE
Details:
code: EPIPE
errno: EPIPE
syscall: write
killed: false
stdout:
stderr: dyld: Library not loaded: /usr/local/lib/libjpeg.8.dylib
Referenced from: /projects/MyProject/node_modules/jpegoptim-bin/vendor/jpegoptim
Reason: image not found
failed: true
signal: null
cmd: /projects/MyProject/node_modules/jpegoptim-bin/vendor/jpegoptim --strip-all --strip-iptc --strip-icc --stdin --stdout
timedOut: false
(node:36379) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): Error in plugin 'gulp-image'
Message:
write EPIPE
Details:
code: EPIPE
errno: EPIPE
syscall: write
killed: false
stdout:
stderr: dyld: Library not loaded: /usr/local/lib/libjpeg.8.dylib
Referenced from: /projects/MyProject/node_modules/jpegoptim-bin/vendor/jpegoptim
Reason: image not found
failed: true
signal: null
cmd: /projects/MyProject/node_modules/jpegoptim-bin/vendor/jpegoptim --strip-all --strip-iptc --strip-icc --stdin --stdout
timedOut: false
(node:36379) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): Error in plugin 'gulp-image'
Message:
write EPIPE
Details:
code: EPIPE
errno: EPIPE
syscall: write
killed: false
stdout:
stderr: dyld: Library not loaded: /usr/local/lib/libjpeg.8.dylib
Referenced from: /projects/MyProject/node_modules/jpegoptim-bin/vendor/jpegoptim
Reason: image not found
failed: true
signal: null
cmd: /projects/MyProject/node_modules/jpegoptim-bin/vendor/jpegoptim --strip-all --strip-iptc --strip-icc --stdin --stdout
timedOut: false
(node:36379) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 12): Error in plugin 'gulp-image'
Message:
write EPIPE
Details:
code: EPIPE
errno: EPIPE
syscall: write
killed: false
stdout:
stderr: dyld: Library not loaded: /usr/local/lib/libjpeg.8.dylib
Referenced from: /projects/MyProject/node_modules/jpegoptim-bin/vendor/jpegoptim
Reason: image not found
failed: true
signal: null
cmd: /projects/MyProject/node_modules/jpegoptim-bin/vendor/jpegoptim --strip-all --strip-iptc --strip-icc --stdin --stdout
timedOut: false
I suppose that's because the plugin needs version 8.
The error is thrown by jpegoptim-bin
Solved via yarn upgrade jpegoptim-bin
(or npm rebuild
)
Sorry for my VERY late response. @1000ch thank you. After installing jpegoptim-bin again the package works perfectly.
gulp-image is responding with the error below. Any ideas what I've done wrong? Thanks!
In Gulpfile.js
gulp.task('imageoptim', function() { gulp.src(source + 'images/*.{jpg,JPG}') .pipe(image()) .pipe(gulp.dest(dest + 'images')); });
Error in terminal
(node:5308) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error in plugin 'gulp-image' Message: write EPIPE Details: code: EPIPE errno: EPIPE syscall: write killed: false stdout: stderr: dyld: Library not loaded: /usr/local/lib/libjpeg.8.dylib Referenced from: /Users/marc/localhost/ar_live/node_modules/jpegoptim-bin/vendor/jpegoptim Reason: image not found