Search code examples
javascriptreactjsgithubdeploymentgithub-pages

A problem with publishing a react app to github with gh-pages


I have published my react app to github using gh-pages according to the guide found at Create React App. Here is a link to my repo: https://github.com/ozhey119/RallyTrip. My app has no routing so I don't understand where the problem is.

When i go to my published website, all I can see is a white page, and some errors that show in the console:

Failed to load resource: the server responded with a status of 404 ()
2.fd66cf29.chunk.js:1 Failed to load resource: the server responded with a status of 404 ()
main.23425634.chunk.js:1 Failed to load resource: the server responded with a status of 404 ()
manifest.json:1 Failed to load resource: the server responded with a status of 404 ()
manifest.json:1 Manifest: Line: 1, column: 1, Syntax error.
main.df77a612.chunk.css:1 Failed to load resource: the server responded with a status of 404 ()

Solution

  • This might sound cheesy, but your repo name case is what is causing the issue. If you open both the links below you'll see the difference,

    https://ozhey119.github.io/RallyTrip/favicon.ico

    https://ozhey119.github.io/rallytrip/favicon.ico

    So in https://github.com/ozhey119/RallyTrip/blob/master/package.json#L4 you can change your homepage to https://github.com/ozhey119/RallyTrip