Github pages website showing blank screen #108596
Replies: 9 comments 1 reply
-
I had an issue similar to this with an academic assignment of mine being hosted on GitHub Pages. Your code uses the "BrowserRouter" from "react-router-dom" which GitHub Pages does not support. You have to use something called "HashRouter" from the same package. https://stackoverflow.com/questions/71984401/react-router-not-working-with-github-pages The link above helped me fix my issue. |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
First, ensure that your repository has an "index.html" file in the root directory, as GitHub Pages uses this file as the default homepage. Verify that your HTML, CSS, and JavaScript code is error-free by inspecting the browser's console for any error messages. Additionally, make sure your repository is set to the correct branch for GitHub Pages (usually the "main" or "master" branch). Finally, allow some time for GitHub Pages to update after making changes. If the issue persists, carefully review your code, and consider seeking help on GitHub or relevant forums for more personalized assistance |
Beta Was this translation helpful? Give feedback.
-
https://github.com/gitname/react-gh-pages Use this, it will create a seperate branch which will have the static files that GitHub can read and deploy. |
Beta Was this translation helpful? Give feedback.
-
Thanks for posting in the GitHub Community, @pankajcs120 ! We're happy you're here. You are more likely to get a useful response if you are posting your question in the applicable category, the Discussions category is solely related to conversations around the GitHub product Discussions. I've gone ahead and moved it for you. Good luck! |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
I'm seeing vercel but if you intend to host it on GitHub Pages, there are two main errors, both are 404 relative paths are quite tricky, so here it is https://pankajcs120.github.io/OTSFront/src/main.jsx though I'm not very sure what are you trying to do, this file will not be run correctly by GitHub Pages but you also have |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Hey, I am new to hosting websites and does not know much about it. Someone suggested me to live my site through github pages but when my site becomes live it shows blank screen. Can someone solve this issue for me?
My website :- https://pankajcs120.github.io/OTSFront/
My Repo :- https://github.com/pankajcs120/OTSFront.git
Beta Was this translation helpful? Give feedback.
All reactions