【问题标题】:Node.js app crashes on deploying to HerokuNode.js 应用程序在部署到 Heroku 时崩溃
【发布时间】:2018-02-11 20:50:18
【问题描述】:

我有一个 Node.js 应用程序在本地运行良好,但是当我在 Heroku 上部署它时,它无法运行。

我已经从我的 Github 存储库中部署了它。

有人可以尝试从我的 repo 部署应用程序并告诉我问题的原因是什么吗?

Git repository link-MyGallary

日志:

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

提前致谢。

【问题讨论】:

    标签: node.js express heroku npm ejs


    【解决方案1】:

    尝试在您的终端上输入“heroku 日志”并在此处分享日志。

    编辑: 它是“npm run start”或“node startfile.js” 例如:“node app.js” (只能输入不带 .js 的 app)

    【讨论】:

    • shared..请看一下
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-12-05
    • 2015-10-11
    • 2015-12-01
    • 2020-09-24
    • 2020-11-08
    相关资源
    最近更新 更多