gulp-community / gulp-livereload

gulp plugin for livereload
768 stars 67 forks source link

How can I handle errors with gulp-livereload? #86

Open sivan opened 9 years ago

sivan commented 9 years ago

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.

baptistedonaux commented 9 years ago

+1

leo commented 8 years ago

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.