Skip to content

Gh-pages 404 errors with deploy a react app #23646

Answered by otter-computer
XAHTC asked this question in General
Discussion options

You must be logged in to vote

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:

create-react-app.dev

Deployment | Create React App

npm run build creates a build directory with a production build of your app. Set up your favorite HTT…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants