Free up a port that is in use

Find the process ID on that port with lsof -ti and end it with kill — one line. Check what it is first; ending the wrong process loses its work.

How

End whatever is listening on port 3000:

lsof -ti :3000 | xargs kill

If it refuses to stop, force it:

lsof -ti :3000 | xargs kill -9

Look first (see “Find what is using a port”) — a database or another app you need may be the one on that port.

Or just ask Titan
Stop whatever is on port 3000 so my app can start. Do it with Titan

Titan is an AI that lives on your computer: tell it what you need and it does it while you watch — you press Return, nothing runs by itself. What is Titan?

Titan isn’t on this computer yet. Get Titan, then press the button again — the task will be waiting, typed in.

Related

Find what is using a portForce quit a frozen app