【问题标题】:Node/React app won't deploy on HerokuNode/React 应用程序不会部署在 Heroku 上
【发布时间】:2018-07-18 02:51:43
【问题描述】:

我已经尝试了所有我能想到的方法并用尽了谷歌搜索。我已经排除了最常见的问题(例如:不在 app.listen 中使用 process.env.PORT)。

这里是heroku日志:

2018-07-18T02:43:26.705491+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=limitless-river-42936.herokuapp.com request_id=78261d20-9656-4f24-9a50-6a8e90fe216f fwd="104.32.39.36" dyno= connect= service= status=503 bytes= protocol=https
2018-07-18T02:43:28.104845+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=limitless-river-42936.herokuapp.com request_id=dab234a8-b9d7-4bbe-aa2b-36e6c4b2fcc9 fwd="104.32.39.36" dyno= connect= service= status=503 bytes= protocol=https
Disconnected from log stream. There may be events happening that you do not see here! Attempting to reconnect...

这里是server.js file

任何帮助将不胜感激!

【问题讨论】:

  • 我看到你没有定义'/' 路径,你能导航到/api/user吗?
  • 应该没有错误,尝试重启应用并访问你定义的路径。
  • @RodrigoMata 我尝试输入多个路径,但没有任何效果,但在本地开发版本中一切正常。

标签: node.js reactjs express heroku


【解决方案1】:

事实证明,由于某种原因,日志文件没有显示所有错误——我的一个导入中有错字。 :)

【讨论】:

    猜你喜欢
    • 2017-11-27
    • 2017-09-26
    • 1970-01-01
    • 2023-03-06
    • 1970-01-01
    • 2018-05-15
    • 2019-10-21
    • 2018-01-27
    • 2018-01-25
    相关资源
    最近更新 更多