07-18-2023, 11:39 PM
Another possible problem solution for React Native developers: **check if metro port is not busy!**
When building in debug mode - make sure **port 8081 for metro packager** is free, not busy for other app (in my case antivirus agent after restart) or if previous metro service is not hanged there.
Check for processes listening on given port numbers:
sudo lsof -i -P | grep LISTEN | grep :$PORT
If found something on port 8081 - kill it with it's pid id
sudo kill -9 {PID_ID}
When building in debug mode - make sure **port 8081 for metro packager** is free, not busy for other app (in my case antivirus agent after restart) or if previous metro service is not hanged there.
Check for processes listening on given port numbers:
sudo lsof -i -P | grep LISTEN | grep :$PORT
If found something on port 8081 - kill it with it's pid id
sudo kill -9 {PID_ID}