When I deploy my React app on Heroku, I receive an Invalid Host error.
When I search for a reason, I find this in the docs: https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#invalid-host-header-errors-after-configuring-proxy
However, when I create an .env file and include the HOST, I receive this error:
Attempting to bind to HOST environment variable: XXX.herokuapp.com
If this was unintentional, check that you haven't mistakenly set it in your shell.
Could not find an open port at XXX.herokuapp.com.
Network error message: listen EADDRNOTAVAIL 52.205.227.252
What am I doing wrong?
UPDATE: I've set the HOST variable to the Heroku url both via the .env file and through the Heroku CLI, but I'm still getting the above error.