It seems there's an error with image optimizer libraries.
The same error happens on gulp-image-min
and some other gulp plugins.
Anyone can help?
My gulp task:
var image = require('gulp-image');
gulp.task('images', function () {
return gulp.src('app/images/*')
.pipe(image())
.pipe(gulp.dest('dist/images'));
});
And the result:
[13:22:35] Using gulpfile ~/Desktop/Test/gulpfile.js
[13:22:35] Starting 'images'...
{ Error: spawn /Users/Sam/Desktop/Test/node_modules/jpegoptim-bin/vendor/jpegoptim ENOENT
at exports._errnoException (util.js:953:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
at onErrorNT (internal/child_process.js:348:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn /Users/Sam/Desktop/Test/node_modules/jpegoptim-bin/vendor/jpegoptim',
path: '/Users/Sam/Desktop/Test/node_modules/jpegoptim-bin/vendor/jpegoptim',
spawnargs:
[ '--strip-all',
'--strip-iptc',
'--strip-icc',
'--stdin',
'--stdout' ],
cmd: '/Users/Sam/Desktop/Test/node_modules/jpegoptim-bin/vendor/jpegoptim --strip-all --strip-iptc --strip-icc --stdin --stdout',
stdout: <Buffer >,
stderr: <Buffer > }