简体   繁体   English

Heroku:加载资源失败:服务器响应状态为 503(服务不可用)/favicon.ico

[英]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.

相关问题 加载资源失败:服务器响应状态为 503(服务不可用) favicon.ico - Failed to load resource: the server responded with a status of 503 (Service Unavailable) favicon.ico Heroku:无法加载资源:服务器以状态404(未找到)响应 - Heroku: Failed to load resource: the server responded with a status of 404 (Not Found) 无法在Heroku中加载Rest API的favicon.ico - Unable to load favicon.ico for rest api in heroku ReactJS Heroku 部署错误:无法加载资源:服务器响应状态为 404(未找到) - ReactJS Heroku Deployment Error: Failed to load resource: the server responded with a status of 404 (Not Found) Heroku 无法 GET / 由于“加载资源失败:服务器使用 node.js 响应状态为 404” - Heroku cannot GET / due to 'failed to load resource: server responded with status of 404' using node.js 加载资源失败:服务器从 heroku 中的 mongodb 加载图片时响应状态为 404(未找到) - Failed to load resource: the server responded with a status of 404 (Not Found) while loading pictures from mongodb in heroku Node.js服务器:无法加载资源:服务器以状态404(未找到)响应 - Nodejs server: Failed to load resource: the server responded with a status of 404 (Not Found) 加载资源失败:服务器响应状态为404(nodejs) - Failed to load resource: the server responded with a status of 404(nodejs) 加载资源失败:服务器在 MERN 中响应状态为 422(不可处理实体) - Failed to load resource: the server responded with a status of 422 (Unprocessable Entity) in MERN 加载资源失败:服务器响应状态为 404(未找到) - Ionic2 - Failed to load resource: the server responded with a status of 404 (Not Found) - Ionic2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM