图像优化器库似乎出现了错误。
同样的错误发生在gulp-image-min
和其他一些gulp插件上。
任何人都可以提供帮助吗?
我的大口任务:
var image = require('gulp-image');
gulp.task('images', function () {
return gulp.src('app/images/*')
.pipe(image())
.pipe(gulp.dest('dist/images'));
});
结果:
[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 > }