Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grunt Serve | connect:livereload Port 9000 already in use

I've used Yeoman to build an angular application using bower and grunt. Running grunt serve gives me this error:

Running "connect:livereload" (connect) task
Fatal error: Port 9000 is already in use by another process.

I have another process using port 9000 so I would like to just change the port for Grunt. I've tried to change the port in my Gruntfile, but I continue to get the same error. Here is the grunt sever settings from Gruntfile.js

 connect: {
     options: {
        port: 9002,
        hostname: 'localhost',
        livereload: 35729
  },
like image 839
Jeremy Wagner Avatar asked Oct 08 '15 14:10

Jeremy Wagner


1 Answers

Find the process id that is using the port:

sudo lsof -i :3000

Kill it:

kill -9 <PID>
like image 73
Phil Hudson Avatar answered Nov 14 '22 16:11

Phil Hudson