[英]Heroku: Failed to load resource: the server responded with a status of 503 (Service Unavailable) /favicon.ico
I keep encountering this problem when deploying my app.我在部署我的应用程序时一直遇到这个问题。 I have tried using serve-favicon but it hasn't worked.
我曾尝试使用serve-favicon ,但没有奏效。
My project can be found here (it's my first MERN stack project and it's not finished, so please don't comment on the code).我的项目可以在这里找到(这是我的第一个 MERN 堆栈项目,还没有完成,所以请不要评论代码)。
I am using this as a template for deploying MERN stack apps to Heroku.我将其用作将 MERN 堆栈应用程序部署到 Heroku 的模板。
EDIT: The problem had nothing to do with the favicon.编辑:这个问题与网站图标无关。 The error displayed in the console was just the result of another thing failing to work properly.
控制台中显示的错误只是另一件事无法正常工作的结果。 In my case, this was the connection to mongoDB Atlas.
就我而言,这是与 mongoDB Atlas 的连接。 I changed my database to Heroku's mLab addon for mongoDB and everything deployed perfectly.
我将我的数据库更改为 Heroku 的用于 mongoDB 的 mLab 插件,并且一切都部署得很好。
This error wasn't being logged on the console so I had to look at Heroku's logs to find what was wrong.这个错误没有被记录在控制台上,所以我不得不查看 Heroku 的日志来找出问题所在。 See Here to learn about logging on Heroku.
请参阅此处了解有关登录 Heroku 的信息。
The problem had nothing to do with the favicon.该问题与网站图标无关。 The error displayed in the console was just the result of another thing failing to work properly.
控制台中显示的错误只是另一件事无法正常工作的结果。 In my case, this was the connection to mongoDB Atlas.
就我而言,这是与 mongoDB Atlas 的连接。 I changed my database to Heroku's mLab addon for mongoDB and everything deployed perfectly.
我将我的数据库更改为 Heroku 的用于 mongoDB 的 mLab 插件,并且一切都部署得很好。
This error wasn't being logged on the console so I had to look at Heroku's logs to find what was wrong.这个错误没有被记录在控制台上,所以我不得不查看 Heroku 的日志来找出问题所在。 See Here to learn about logging on Heroku.
请参阅此处了解有关登录 Heroku 的信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.