Deployed React App showing white blank Page

I deployed my react app on netlify through github, it became live. It was working perfectly on localhost but netlify provided link is just showing white blank page. What could be the possible reason?
Netlify live website link:
Githhub Repo Link: GitHub - mannan49/gear_train

@mannan49 Your issue is your project configuration.

When you encounter an issue between what you see locally, and what you see on Netlify, you should always run your build locally and check the output directly, both what it says when building and also the files that it outputs.

This is because most systems don’t perform “exactly the same thing” when running their “development” mode, compared to their “build” mode.

When you run npm run build you will see that it says:

Checking the files you can see it’s correct, that the site has been built with references that expect it to be hosted in a folder of /gear_train/

But you’re deploying the files to the root.

So you have a file reference like…

Which is actually here…

The fix is as it mentions in the note shown during the build…

you can control this with the homepage field in your package.json.

1 Like