6

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
  },
Jeremy Wagner
  • 485
  • 4
  • 9
  • 19

1 Answers1

10

Find the process id that is using the port:

sudo lsof -i :3000

Kill it:

kill -9 <PID>
Phil Hudson
  • 3,819
  • 8
  • 35
  • 59