mars/create-react-app-buildpack

With static.json, got 500 error for both favicon.ico and client routing paths

Closed this issue · 2 comments

I created static.json per document as below.

{
  "root": "build/",
  "routes": {
    "/**": "index.html"
  }
}

However, I got following errors.

500

  1. /automation-tool is one of the route created by react router
  2. favicon.ico is located in same level of index.html in build/ folder. Moreover, as the pic above, the favicon.ico has been treated as text/html

Any configuration I missed? Currently I'm using create-react-app@2.1.1.

mars commented

Hi @just4fun 😁

When those 500 errors are returned, what is logged by the Heroku app? Please tail the logs and paste the result here:

heroku logs -t

That should indicate the problem.

Hey @mars

It's very weird that when I add static.json back to my project then force push to heroku again, everything works well. Last weekend I did same thing but had no luck.

Anyway, thanks.