我有一个简单的 MERN 应用程序,在本地主机上运行良好,但是当我将其部署到 Heroku 时,我看到一个页面出现以下错误:
应用程序错误 应用程序中发生错误,无法提供您的页面。如果您是应用程序所有者,请检查您的日志以了解详细信息。您可以使用以下命令从 Heroku CLI 执行此操作
heroku logs --tail
控制台显示如下:Failed to load resource: the server responded with a status of 503 (Service Unavailable)
还附上了一张图片!
下面还给出了 Heroku 日志......
我是 MERN Dev 的新手,所以无法真正弄清楚问题到底是什么,Heroku 日志也没有多大帮助,请帮助我!
Warning: heroku update available from 7.59.0 to 7.59.2.
2022-01-05T13:28:24.783142+00:00 app[web.1]:
2022-01-05T13:28:25.124488+00:00 app[web.1]: /app/node_modules/whatwg-url/lib/encoding.js:2
2022-01-05T13:28:25.124505+00:00 app[web.1]: const utf8Encoder = new TextEncoder();
2022-01-05T13:28:25.124505+00:00 app[web.1]: ^
2022-01-05T13:28:25.124506+00:00 app[web.1]:
2022-01-05T13:28:25.124507+00:00 app[web.1]: ReferenceError: TextEncoder is not defined
2022-01-05T13:28:25.124507+00:00 app[web.1]: at Object.<anonymous> (/app/node_modules/whatwg-url/lib/encoding.js:2:21)
2022-01-05T13:28:25.124508+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:776:30)
2022-01-05T13:28:25.124508+00:00 …Run Code Online (Sandbox Code Playgroud)