简体   繁体   中英

Node.js app crashes on deploying to Heroku

I have a Node.js app which runs well locally, but when I deploy it on Heroku, it doesn't run.

I have deployed it from my Github repository.

Can some one try deploying the app from my repo and tell me what the cause of the problem is?

Git repository link-MyGallary

Logs:

2017-09-03T12:22:17.683830+00:00 heroku[web.1]: State changed from crashed to starting
2017-09-03T12:22:18.878329+00:00 heroku[web.1]: Starting process with command `: node run start`
2017-09-03T12:22:20.670131+00:00 heroku[web.1]: Process exited with status 0
2017-09-03T12:22:20.682348+00:00 heroku[web.1]: State changed from starting to crashed
2017-09-03T12:24:19.679927+00:00 heroku[web.1]: State changed from crashed to starting
2017-09-03T12:24:20.918678+00:00 heroku[web.1]: Starting process with command `: node run start`
2017-09-03T12:24:23.583966+00:00 heroku[web.1]: Process exited with status 0
2017-09-03T12:24:23.595826+00:00 heroku[web.1]: State changed from starting to crashed
Disconnected from log stream. There may be events happening that you do not see here! Attempting to reconnect...
2017-09-03T12:24:19.679927+00:00 heroku[web.1]: State changed from crashed to starting
2017-09-03T12:24:20.918678+00:00 heroku[web.1]: Starting process with command `: node run start`
2017-09-03T12:24:23.583966+00:00 heroku[web.1]: Process exited with status 0
2017-09-03T12:24:23.595826+00:00 heroku[web.1]: State changed from starting to crashed
2017-09-03T12:33:34.507063+00:00 heroku[web.1]: Process exited with status 0
2017-09-03T12:39:41.420058+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mygallary.herokuapp.com request_id=10a1d1e0-5b5f-45f7-b65c-efdb8d6e9b3f fwd="106.51.243.120" dyno= connect= service= status=503 bytes= protocol=https
2017-09-03T12:39:42.764416+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mygallary.herokuapp.com request_id=5ff09ee3-26d7-44a6-8556-f4e5d19a0ce5 fwd="106.51.243.120" dyno= connect= service= status=503 bytes= protocol=https

Thanks in advance.

Try typing "heroku logs" on your terminal and share the logs here.

EDIT: It's "npm run start" or "node startfile.js" Ex: "node app.js" (can type only app without .js)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM