killing a port on macos
You can find out what is running on a specific port by running the command lsof -i with the port number, :<PortNumber>.
sudo lsof -i :<PortNumber>kill -9 <PID>
Or you can kill al processes with the following command:
killall node