javascript - 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,所以不知道在那里做什么。
如果有人有任何建议,请告诉我。
解决方案
推荐阅读
- c++ - 使用 std::ifstream 和 getc 读取换行符的区别
- ionic-framework - 我对命令 Ionic 3 和 Firebase 和 angularfire2 有问题
- batch-file - windows bat文件:回显字符串而不执行它
- python-2.7 - 在另一列pyspark中创建具有字符串长度的列
- c# - 如何将相机添加到 Matrix4x4 旋转
- heroku - 在打开 heroku 的情况下获取多个应用程序的列表
- python - 从 100.21 Hz 到 8 Hz 下采样信号(非整数抽取因子)
- sublimetext3 - Sublime Text 3:主配置?(用于:灾难恢复、移植到新机器等)
- javascript - 比较 2 个数组并分配匹配值
- c++ - C++:使用指向成员的指针访问子结构的数据成员