Heroku崩溃错误:heroku [路由器]:at =错误代码= H10 desc =“应用程序崩溃”方法=获取路径=“ / favicon.ico”

时间:2020-08-25 02:34:31

标签: node.js reactjs heroku

我正在尝试在heroku上启动我的nodejs应用程序。但是,每次启动时,它都会崩溃并显示以下错误。人们不断提到我必须进行一些端口修复,但是我不知道在哪里以及如何进行?有人可以帮我调试崩溃的问题吗。如果我使用npm start在本地运行,则可以正常工作。

这是我的仓库:https://github.com/Gorgutzz/portfolio-site

2020-08-25T02:29:52.559666+00:00 heroku[web.1]: State changed from crashed to starting
2020-08-25T02:30:03.658131+00:00 heroku[web.1]: Starting process with command `npm start`
2020-08-25T02:30:06.506095+00:00 app[web.1]:
2020-08-25T02:30:06.506170+00:00 app[web.1]: > portfolio-site@0.1.0 start /app
2020-08-25T02:30:06.506176+00:00 app[web.1]: > react-scripts start
2020-08-25T02:30:06.506181+00:00 app[web.1]:
2020-08-25T02:30:09.243945+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.17.138.30/
2020-08-25T02:30:09.244281+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-08-25T02:30:09.244350+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-08-25T02:30:09.244420+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-08-25T02:30:09.244654+00:00 app[web.1]: Starting the development server...
2020-08-25T02:30:09.244655+00:00 app[web.1]:
2020-08-25T02:30:09.336466+00:00 heroku[web.1]: Process exited with status 0
2020-08-25T02:30:09.382429+00:00 heroku[web.1]: State changed from starting to crashed

2020-08-25T02:30:17.664264+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=leo-port123.herokuapp.com request_id=d96f2dd2-7ebf-4123-a30a-2a499c5e826f fwd="24.102.208.138" dyno= connect= service
= status=503 bytes= protocol=http
2020-08-25T02:30:18.664310+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=leo-port123.herokuapp.com request_id=f5a14315-78c3-41b9-b90c-ae748f7f4800 fwd="24.102.208.138" dyno= conne
ct= service= status=503 bytes= protocol=http

1 个答案:

答案 0 :(得分:1)

Heroku在每次测功机启动时在随机分配的端口上运行。您有三个选择: