Answer the question
In order to leave comments, you need to log in
What causes an error in a Gulp task?
Mistake
Error: write callback called multiple times
at DestroyableTransform.afterTransform (/home/kek/_local/web-starter/node_modules/readable-stream/lib/_stream_transform.js:84:31)
at EventEmitter.signals.on.err (/home/kek/_local/web-starter/node_modules/gulp-cache/lib/index.js:451:7)
at EventEmitter.emit (events.js:189:13)
gulp.task('img', () => {
return gulp.src(paths.input.img + '**/*.{png,jpg,gif,webp}')
.pipe(cache(imagemin([
imagemin.gifsicle({
interlaced: true
}),
imagemin.jpegtran({
progressive: true
}),
imageminJpegRecompress({
loops: 5,
min: 70,
max: 75,
quality: 'medium'
}),
imagemin.svgo(),
imagemin.optipng({
optimizationLevel: 3
}),
pngquant({
quality: '65-70',
speed: 5
}),
imageminWebp({
quality: 80,
preset: 'photo',
method: 6
}),
])))
.pipe(gulp.dest(paths.build));
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question