gulp-livereload
gulp-livereload copied to clipboard
How can I handle errors with gulp-livereload?
When I work between multiple projects, always got 'Error: listen EADDRINUSE' like #33. I know the reason is some other task(maybe another gulp-livereload) is running, a port conflict is on 35729
. But the error message is not very friendly.
So is there any way to handle error with gulp-livereload? Like:
gulp.src(src)
// ...
.pipe(uglify({compress: {}}))
.pipe(gulp.dest('./dist'))
.on('error', function (error) {
console.error('Error:' + error);
});
So I can use
livereload.listen().on('error', function(error) {
console.error('Port 35729 conflict!' + error);
});
to avoid original error message.
+1
Hey, @sivan! Just wanted to let you know that I've created a standalone fork of this repo, since it doesn't seem to be maintained anymore. You can find it here.
So I might be a good idea to re-open this issue there.