Gulp + Livereload Occupied port Issue

Sometimes when using Gulp with Livereload when one wishes to stop it and restarting it Ctrl+c  and gulp still holds the port occupied resulting in the following error.

… Uhoh. Got error listen EADDRINUSE :::35729 …
Error: listen EADDRINUSE :::35729
at Object.exports._errnoException (util.js:856:11)
at exports._exceptionWithHostPort (util.js:879:20)
at Server._listen2 (net.js:1234:14)
at listen (net.js:1270:10)
at Server.listen (net.js:1366:5)
at Server.listen (/var/www/angle.local/master/node_modules/tiny-lr/lib/serve                   r.js:162:15)
at Function.exports.listen (/var/www/angle.local/master/node_modules/gulp-li                   vereload/gulp-livereload.js:68:12)
at Gulp.<anonymous> (/var/www/angle.local/master/gulpfile.js:282:16)
at module.exports (/var/www/angle.local/master/node_modules/orchestrator/lib                   /runTask.js:34:7)
at Gulp.Orchestrator._runTask (/var/www/angle.local/master/node_modules/orch                   estrator/index.js:273:3)

You already have a server listening on 35729
You should stop it and try again.

 

A quick solution is to kill the process by port with the following command

kill -9 $(lsof -t -i :35729)

 

 

 

Please like & share:

Leave a Reply