Okay, am back again on how to check your app for errors. In my previous case, it was a wrong import or a typo(better use Typescript to avoid these small typos) that was causing my app to crash locally.Fixing that solved it for both localhost and Heroku. But I was here again today because of the H10 error. It seems your article has now become my checklist whenever a deploying to Heroku. so to add a few tips:
Run your code locally using npm and also with
heroku local -a <heroku-app-name>
. Make sure you test everything to make sure nothing crashes
If you use .env vars, make sure to set them up in the Heroku config vars and beware of unwanted spacing in your config values. (In one case, my MongoDB Atlas con string had some unwanted spaces in my config value)
Depending on your sever(esp. for Hapi), you must set your host to this:
Don't give up, check community support for the framework, library etc you are using, you are no the only one who has been stuck on that annoying bug. A problem shared is half solved.
That was why I was here today: I switched from Express to Hapi (just curiosity sake) only to meet this H10 error again. After lot of hours and multiple tabs of StackOverflow answers, I went to the Slack community of Hapi to seek help. It was then that I found out I needed step 3 above so make community support your last option before you even think of giving up
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Okay, am back again on how to check your app for errors. In my previous case, it was a wrong import or a typo(better use Typescript to avoid these small typos) that was causing my app to crash locally.Fixing that solved it for both localhost and Heroku. But I was here again today because of the H10 error. It seems your article has now become my checklist whenever a deploying to Heroku. so to add a few tips:
heroku local -a <heroku-app-name>
. Make sure you test everything to make sure nothing crasheshost: process.env.HOST || '0.0.0.0' || 'localhost'
That was why I was here today: I switched from Express to Hapi (just curiosity sake) only to meet this H10 error again. After lot of hours and multiple tabs of StackOverflow answers, I went to the Slack community of Hapi to seek help. It was then that I found out I needed step 3 above so make community support your last option before you even think of giving up