gh-pages 404 errors with deploy a react app

I have 404 errors when I tried to deploy my react app to gh-pages. Here is my github - https://github.com/XAHTC/test-app/, and gh-pages - https://github.com/XAHTC/test-app/tree/gh-pages.

It is a screenshot of errors:

This is because their is no GitHub pages for your account. You will need to create a repository named XAHTC.github.io and place your code in their. You can see my site here.

Hi @XAHTC, welcome to the GitHub Support Community!

I’m not seeing those errors in your Pages site anymore, however it looks like they were caused by your asset URLs missing the test-app repository name section.

When you’re deploying a React app to GitHub Pages there’s some steps you need to follow to make sure that everything works correctly—specifically adding the homepage variable to your package.json file. This means that all your URLs include the required repo name.

For exact steps I’d recommend reading over the documentation here:

1 Like