0

Hi I've been struggling with Heroku for several days, my app can build successfully but met the application error. here's the log tail

>  2022-03-01T17:17:16.504128+00:00 heroku[web.1]: Process exited with
> status 1 2022-03-01T17:17:16.699016+00:00 heroku[web.1]: State changed
> from starting to crashed 2022-03-01T17:17:17.998297+00:00
> heroku[router]: at=error code=H10 desc="App crashed" method=GET
> path="/" host=to-do-list-annabelle-sun.herokuapp.com
> request_id=ce37aa27-2f6f-4959-9325-92cf3f36bb3d fwd="50.92.222.229"
> dyno= connect= service= status=503 bytes= protocol=https
**> 2022-03-01T17:17:18.375486+00:00 heroku[router]: at=error code=H10
> desc="App crashed" method=GET path="/favicon.ico"**
> host=to-do-list-annabelle-sun.herokuapp.com
> request_id=4fbcae61-950a-4191-8f24-27471438c44c fwd="50.92.222.229"
> dyno= connect= service= status=503 bytes= protocol=https

here's my code

I checked with https://dev.to/lawrence_eagles/causes-of-heroku-h10-app-crashed-error-and-how-to-solve-them-3jnl for every items it looks same with this file, somehow it just crashed.

I would be grateful if you can take a look, thanks my package.json

{
  "name": "todolist-v1",
  "version": "1.0.0",
  "description": "",
  "main": "app.js",
  "scripts": {
    "start": "node app.js"

  },
  "author": "",
  "license": "ISC",
  "engines": {
    "node": "16.14.0",
    "npm": "8.3.1"
  },
  "dependencies": {
    "body-parser": "^1.18.3",
    "ejs": "^2.6.1",
    "express": "^4.16.3",
    "lodash": "^4.17.21"
  }
}

my procfile:

web: node app.js

my listen method in app.js

app.listen(process.env.PORT || 3000, function(req, res) {
  console.log("Server started on port 3000");
});

also tried restart the heroku, set any IP can access to my database... nothing works...

Chris
  • 112,704
  • 77
  • 249
  • 231
  • Welcome to Stack Overflow. SO works a bit differently from other sites, so you might want to take the [tour]. [Please don't add "solved" to your title or question](https://meta.stackexchange.com/a/116105/248627). Instead, [mark an answer correct by clicking on the checkmark](https://meta.stackexchange.com/q/5234/248627). You can also [add your own answer](https://stackoverflow.com/help/self-answer) and accept it if none of the ones you received solved your problem. – Chris Mar 01 '22 at 18:37

0 Answers0