If, like me, you're configuring Heroku to run a script from your package.json
file on deploy, make sure you haven't hard-coded the value of PORT
in that script! If you do, you'll end up like me and spend an hour trying to figure out why you're getting this error.