-
Select Topic AreaQuestion BodyI've developed a react app that runs fine locally. I'm now trying to deploy it using GitHub Pages. I've followed the instructions, but I get a blank page, and I can see several 404 errors in the logs. Here is the homepage property I've added to the project's package.json:
I've added this to scripts:
And I run this command to deploy the app: Can you help me fixing this please ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
Hi @matdev First of all, you need to add your root path to the basename prop of BrowserRouter. If you are not using BrowserRouter, add the following:
Also update the route to your
to:
Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
Removing the repeated github username from the homepage url fixed the problem: Correct value for "homepage": "homepage": "https://myusername.github.io/myreponame" |
Beta Was this translation helpful? Give feedback.
Removing the repeated github username from the homepage url fixed the problem:
Correct value for "homepage":
"homepage": "https://myusername.github.io/myreponame"