Reputation: 191
I am trying to deploy my Node.JS site through Heroku and I keep getting this error "Failed to load resource: the server responded with a status of 503 (Service Unavailable) favicon.ico" I searched around and thought I would add the following to my header
<link rel="shortcut icon" href="">
However I am still getting this error. Any ideas?
Upvotes: 4
Views: 42023
Reputation: 1
Error: Failed to load resource: the server responded with a status of 503 (Service Unavailable) favicon.ico
issue 1:
Originally set const PORT = 3000
, causing Heroku to fail recognizing the assigned port.
Solution: Dynamic Port Assignment: Updated to const PORT = process.env.PORT || 3000
issue 2:
Incorrect Start Script: Used script: "nodemon start"
in package.json, incompatible with Heroku's deployment.
Solution:
Corrected Start Script: Changed "start" script to "node server.js"
in package.json
Now, the application starts successfully on Heroku.
Upvotes: 0
Reputation: 1252
I had the same problem, after I checked it turned out that the VPN in my browser was still on, after I turned it off the problem was gone
Upvotes: 0
Reputation: 305
In my case, this issue was seen due to the failure of the backend services. Restarting the backend services/server resolved the issue for me.
Upvotes: 3
Reputation: 211610
This specific problem is why packages like express-favicion
and serve-favicon
exist. They add a handler for the favicon.ico
file.
What you've done there has only made things worse as it tells the client that the icon for the page is actually the page itself.
Upvotes: 4