My react website on GitHub Pages shows blank white screen #201797
Replies: 7 comments 18 replies
-
|
A blank white page with a successful Pages build usually means the React app is throwing a JavaScript error at runtime or is using incorrect asset/router paths for deployment under The first thing I would do is open the browser's Developer Tools (F12) and check the Console and Network tabs for 404s or JavaScript errors. For React apps hosted in a repository subdirectory, you typically need to configure the app's base path (for example, If you can share the exact console error message (or a screenshot of it), it should be possible to pinpoint the issue quickly. |
Beta Was this translation helpful? Give feedback.
-
|
A blank white screen with a successful GitHub Actions build usually means the app is loading but failing at runtime. A few things to check: Open Developer Tools (F12) → Console and see if there are any JavaScript errors. If you can share the repository structure (especially package.json, vite.config.ts, or webpack config), it'll be much easier to identify the exact cause. |
Beta Was this translation helpful? Give feedback.
-
|
Since you're new to React and GitHub Pages, I'd suggest taking a step back and first determining whether the problem is with the deployment or with the application itself. A blank white page can be caused by several different issues that all look identical from the browser. Here's a simple way to narrow it down:
Because you mentioned that the project was generated by Manus AI, there's another possibility: the generated project may rely on environment variables, APIs, or configuration files that weren't included when you downloaded the ZIP. In that case, the project can build successfully but fail immediately when it starts in the browser. If you're comfortable sharing a few additional files, the community can usually identify the issue much more quickly. The most helpful ones would be:
Those details would help determine whether this is a GitHub Pages configuration issue, a React runtime error, or a missing project dependency. |
Beta Was this translation helpful? Give feedback.
-
|
The base-path advice above is right in general, but I went and looked at your actual repo/workflow and think there's something more specific going on. Your vite.config.ts (at the repo root) sets root to the client folder and outDir to dist/public. But your GitHub Actions workflow runs the build with working-directory: ./client, and then uploads ./client/dist as the Pages artifact. Vite normally looks for its config in whatever directory the build is run from — so when the build runs from inside client/, it may not be picking up that root-level config at all, and even if it did, the output path it writes to (dist/public, relative to repo root) doesn't match the folder your workflow is uploading (client/dist). That would explain exactly what you're seeing: the build genuinely succeeds (green check), but the thing GitHub Pages is serving isn't the right build output, so you get a blank page. Two things I'd try: Move vite.config.ts (and tsconfig.json) inside the client/ folder, next to package.json, so it's actually picked up when the build runs from there. After that, check the Network tab again — if JS/CSS start loading with a 200 instead of 404, you're most of the way there. |
Beta Was this translation helpful? Give feedback.
-
|
I looked at the public repo, and there are a few concrete repo-structure problems that are more specific than the usual “blank React page” checklist. The main issues I see are:
GitHub’s Pages docs describe the custom workflow path/pattern here: https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site
"scripts": {
"dev": "vite --host",
"build": "vite build"
"start": "NODE_ENV=production node dist/index.js"
}It should be: "scripts": {
"dev": "vite --host",
"build": "vite build",
"start": "NODE_ENV=production node dist/index.js",
"preview": "vite preview --host"
}
For your current layout, I would make the setup consistent like this:
export default defineConfig({
base: "/official/",
plugins: [react(), tailwindcss()],
resolve: {
alias: {
"@": path.resolve(import.meta.dirname, "src"),
},
},
build: {
outDir: "dist",
emptyOutDir: true,
},
});Vite’s official GitHub Pages guide also calls out the Then your workflow can keep building from So my suggested fix order would be:
That should get you much closer than changing |
Beta Was this translation helpful? Give feedback.
-
|
I think the blank page is caused by deployment configuration rather than React itself. The project needs to deploy the generated client/dist folder, Vite should use base: "/official/", and the GitHub Actions workflow must complete successfully. The browser should be loading /official/assets/... files, not /client/src/main.tsx. Once the workflow is fixed and the built assets are deployed, the site should load normally. |
Beta Was this translation helpful? Give feedback.
-
|
Hi velaragirlgroup, welcome! This is one of the most common React + GitHub Pages issues, and it almost always comes down to paths — your build looks for assets at the domain root, but GitHub Pages is serving your site from a subfolder (
Start with the browser console — it'll tell you exactly what's failing and save a lot of guesswork. Let us know what errors show up and we can narrow it down further. |
Beta Was this translation helpful? Give feedback.























Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Question
💬 Feature/Topic Area
Code Search and Navigation
Body
Manus AI app created a website for me. i downloaded the zip folder from manus AI app and extracted it. i uploaded some of those files to github repository: https://github.com/velaragirlgroup/official. I made changes to the folder: client/src/pages/Home.txs. My site at https://velaragirlgroup.github.io/official/ shows only a blank white screen. The build is green in GitHub Actions but nothing displays. My website on GitHub shows blank white screen.
i asked copilot chatgpt to help me but nothing has changed. AI cant help me at all and im stuck. im completely new to this and dont know how to handle these things. i really want this website to work: https://velaragirlgroup.github.io/official/. will anyone please help out?
Beta Was this translation helpful? Give feedback.
All reactions