gulp-livereload icon indicating copy to clipboard operation
gulp-livereload copied to clipboard

How can I handle errors with gulp-livereload?

Open sivan opened this issue 9 years ago • 2 comments

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.

sivan avatar May 15 '15 07:05 sivan

+1

baptistedonaux avatar Nov 10 '15 09:11 baptistedonaux

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.

leo avatar Feb 17 '16 13:02 leo