By default heroku localuses port 5000 if the --port flag is not passed or ENV["PORT"] is not set.
Starting with macOS Monterey, a Control Center process (related to the AirPlay Receiver feature) grabs this port commonly used by many web development servers (e.g. Python Flask).
Ideally, it would be preferred if macOS changed what port AirPlay Receiver listens on in a future OS update, but the expectation of that happening is low.
Failing that, the next best preferred solution would be for a future version of node-foreman to choose a different default port. Given that node-foreman hasn't been touched in a number of years, and changing the default port would be a significant breaking change (and would impact users that aren't using Macs); again the expectation of this changing is low.
Another option is to simply turn off AirPlay Receiver as mentioned in the above linked Medium post; but that has to be done on every machine that development is done on (and obviously precludes using AirPlay Receiver as designed).
For now, we're left with having to explicitly pass --port 3000 to all heroku local commands (or create a .env file with PORT=3000), which is fine, but less than ideal.
By default
heroku local
uses port 5000 if the--port
flag is not passed orENV["PORT"]
is not set.Starting with macOS Monterey, a Control Center process (related to the AirPlay Receiver feature) grabs this port commonly used by many web development servers (e.g. Python Flask).
Ideally, it would be preferred if macOS changed what port AirPlay Receiver listens on in a future OS update, but the expectation of that happening is low.
Failing that, the next best preferred solution would be for a future version of
node-foreman
to choose a different default port. Given thatnode-foreman
hasn't been touched in a number of years, and changing the default port would be a significant breaking change (and would impact users that aren't using Macs); again the expectation of this changing is low.Another option is to simply turn off AirPlay Receiver as mentioned in the above linked Medium post; but that has to be done on every machine that development is done on (and obviously precludes using AirPlay Receiver as designed).
For now, we're left with having to explicitly pass
--port 3000
to allheroku local
commands (or create a.env
file withPORT=3000
), which is fine, but less than ideal.