Stream with gulp-notify times out before copying large directory to destination
I'm unsure if this issue traces entirely back to gulp-notify. I have a gulp task that looks something like:
gulp.src(sources, {base: './src/jade'})
.pipe(jade({
pretty: true
}))
.pipe(gulp.dest(targetDir + '/HTML/'))
.pipe(notify('Compiled HTML'))
.on("error", notify.onError(function (error) {
return "Jade error: " + error.message;
}));
This works fine until I have a directory with more than 20 files. Over 20 files, only the first 19 or 20 will consistently get built to targetDir. The stream process seems to be timing out before copying all files, but no error is caught. Removing gulp-notify from the above solves the problem.
Have you tried adding onLast setting to true for gulp-notify? Could it be that something crashes as you send too many notifications to the Notification Center?
Just tried .pipe(notify({message: 'Compiled HTML', onLast: true})). Still not getting all files.
Same here with onLast: true. My OS is Windows 8. It seems like it works fine in Windows 7.
I'm running OS X 10.10.3, for the record.