1

Pretty much every time I run my node/react apps I get this error on the port where I'm running the node server. I know how to solve it temporarily by finding the PID with lsof -i:5000 and then using the kill command to shut it down.

However I'm really tired of having to this every single time I'm running one of my node/react apps locally, since if I ignore the error, my apps won't work properly. Why does this keep happening? What can I do to make the error stop coming back all the time?

I'm putting this out as a new question since I haven't found an answer that deals with how to stop the error from constantly coming back, rather than to just clear the error once. Big thanks in advance!

ZeGeR
  • 51
  • 3
  • 10
  • I have had the same problem on occasion, and it ended up being vscode. Try restarting it, and also rebooting your machine might help – Mikkel Feb 08 '20 at 23:42
  • 1
    what process did you find running on the port? if you can identify it, it should give a clue as to why it keeps getting used. You can try having your program use a different port (5001?) – Always Learning Feb 09 '20 at 00:34
  • When I run lsof -i:5000 I get this: Command node PID 15142 FD 23u Type IPv6 SIZE/OFF 0t0 NODE TCP NAME *:commplex-main (LISTEN) – ZeGeR Feb 09 '20 at 09:28

0 Answers0