I'm trying to serve firebase functions locally, but when I run firebase serve
or firebase emulators:start
the error message is: "Port 5000 is not open, could not start functions emulator."
I'm using Windows 10, so I've tried to change the port number, check if the port is blocked by Firewall and I create a new rule in Firewall to ports 5000-5010 but none of this approaches worked for me.
For Mac/Linux, use the Terminal/Shell to find the Process ID (PID), then kill the process.
sudo lsof -i :5000
sudo kill -9 PID