首页 > 解决方案 > Heroku 部署错误 - (请求超时)

问题描述

我有一个正在运行的 reactjs / nodejs 应用程序,我正在尝试使用 Heroku 托管...该应用程序已实时部署,但我实际上无法加载任何内容。在我的日志中,我看到了这个:

     2021-04-18T23:41:58.000000+00:00 app[api]: Build succeeded
2021-04-18T23:42:14.395000+00:00 app[web.1]: npm WARN shared@1.0.0 No description
2021-04-18T23:42:14.422024+00:00 app[web.1]: npm WARN shared@1.0.0 No repository field.
2021-04-18T23:42:14.422890+00:00 app[web.1]: 
2021-04-18T23:42:14.682226+00:00 app[web.1]: added 1 package from 6 contributors and audited 486 packages in 17.344s
2021-04-18T23:42:15.300879+00:00 app[web.1]: found 56017 vulnerabilities (40514 low, 15 moderate, 15488 high)
2021-04-18T23:42:15.300903+00:00 app[web.1]: run `npm audit fix` to fix them, or `npm audit` for details
2021-04-18T23:42:15.361457+00:00 app[web.1]: /app/.heroku/node/lib/node_modules/shared -> /app/shared
2021-04-18T23:42:15.391152+00:00 app[web.1]: /app/react-web/node_modules/shared -> /app/.heroku/node/lib/node_modules/shared -> /app/shared
2021-04-18T23:42:16.015673+00:00 app[web.1]: 
2021-04-18T23:42:16.015683+00:00 app[web.1]: > react-web@0.1.0 start /app/react-web
2021-04-18T23:42:16.015687+00:00 app[web.1]: > node --max_old_space_size=2560 checkEnvironmentForBuild && react-app-rewired start
2021-04-18T23:42:16.015687+00:00 app[web.1]: 
2021-04-18T23:42:20.857742+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.16.225.30/
2021-04-18T23:42:20.858248+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2021-04-18T23:42:20.858378+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/react-web/public
2021-04-18T23:42:20.858506+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2021-04-18T23:42:20.858836+00:00 app[web.1]: Starting the development server...
2021-04-18T23:42:20.858837+00:00 app[web.1]: 
2021-04-18T23:42:21.460296+00:00 heroku[web.1]: State changed from starting to up
2021-04-18T23:42:52.656047+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/" host=cleaningassistant.herokuapp.com request_id=3b1180dc-c080-4624-8a97-d9247577dc3f fwd="99.249.30.56" dyno=web.1 connect=0ms service=30001ms status=503 bytes=0 protocol=https

基本上是说Request Timeout,当我所有的启动脚本都正确时。它唯一可以寻找的就是我定义一个端口。问题是,这不是 nodejs 应用程序,它的 reactjs,所以不知道在那里做什么。

应用程序设置: 在此处输入图像描述

如果有人有任何建议,请告诉我。

标签: javascriptnode.jsreactjsheroku

解决方案


推荐阅读