【问题标题】:Problem on deploying Docker image on Heroku (react app)在 Heroku (react app) 上部署 Docker 镜像的问题
【发布时间】:2020-07-17 15:51:27
【问题描述】:

我有一个应用程序,它在两个不同的文件夹中有单独的后端和前端。 (Nodejs 和 React) 我在 Docker 和本地都运行它们,一切都很好。现在我正在尝试将它们部署在 Heroku 上。到目前为止,它们已部署,我对后端没有任何问题,但对于我的前端,当我检查 Heroku 日志时,我得到了这些:

2020-07-17T00:41:07.783090+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=serene-tundra-72728.herokuapp.com fwd="96.20.56.73" dyno= connect= service= status=503 bytes= protocol=https

2020-07-17T00:41:08.398622+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=serene-tundra-72728.herokuapp.com

还有:

2020-07-17T01:58:24.005508+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /ISS-CLIENT/public
2020-07-17T01:58:24.005601+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /

我不确定这里是否只有一个或多个问题。我读了很多文章,但都不够清楚。

这是我在这里的第一篇文章,我是编码新手,因此我将不胜感激。

PS:我的前端repo

【问题讨论】:

    标签: node.js docker heroku create-react-app


    【解决方案1】:

    最后,在阅读了很多文章后,我能够通过以下方式解决这个问题:

    • 将“react-scripts”从“3.4.1”降级为“3.4.0”。
    • 我还从 create-react-app 安装中删除了所有不必要的文件。

    我希望这些信息会有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-09-09
      • 2020-05-26
      • 2019-09-16
      • 1970-01-01
      • 2020-01-31
      • 2018-11-20
      • 2020-08-19
      相关资源
      最近更新 更多