如何解决at =错误代码= H13 desc =“连接已关闭但没有响应”?

问题描述

它正在localhost上运行,但在heroku-app上已关闭

2020-08-15T02:15:31.851406+00:00 app[web.1]: npm ERR! errno 1
2020-08-15T02:15:31.851963+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=GET path="/" host=yummy-burger-app.herokuapp.com request_id=dc7776de-d03f-4415-9448-fcd71e18efa1 fwd="100.38.167.47" dyno=web.1 connect=1ms service=14ms status=503 bytes=0 protocol=https

如果您需要更多信息,请随时与我联系

解决方法

遇到了同样的问题,通过将我的服务器从https更改为http解决了它。如果已配置https,请检查服务器配置

我改变了

const server = https.createServer(httpOptions,app);

对此

const server = http.createServer(app);

对我有用

,

不用担心,H13是一种错误,主要发生在用户没有填写任何表格退出时。

处理此错误的最简单方法是您可以在 heroku 上重新启动服务器。