Jeremy Wagner
Jeremy Wagner

Reputation: 515

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
  },

Upvotes: 6

Views: 6908

Answers (1)

Phil Hudson
Phil Hudson

Reputation: 3901

Find the process id that is using the port:

sudo lsof -i :3000

Kill it:

kill -9 <PID>

Upvotes: 10

Related Questions