Netlify blank page

I connected my website with gh-pages and now I want to deploy it on Netlify but there is only white page.

website inspect errors:

dex-e4c1c024.js:1
Failed to load resource: the server responded with a status of 404 ()

index-a25537c4.css:1
Failed to load resource: the server responded with a status of 404 ()

index-a25537c4.css:1
Failed to load resource: the server responded with a status of 404 ()

Website build using: vitejs

My repo: https://github.com/gines18/new

https://glittery-concha-26bcb7.netlify.app

I’ve tried looking for help, google, vite, netlify website and still it’s not working.

Hello,

This guide may help with the error: [Support Guide] I’ve deployed my site but I still see "Page not found” - #19

@gines18 The issue isn’t related to Netlify, but caused only by how your project is configured.

You’ll see exactly the same issue locally if you execute npm run build then npx serve -s dist

The issue is being caused here:

The related Vite documentation is here:

https://vitejs.dev/config/shared-options.html#base

You’ve specified you will be hosting the site in a folder of /new, so Vite is generating paths pointing there… except that’s not where you’re hosting the site, you’re hosting it at the root /.

Since the default of base is / you can just delete it from your vite.config.js

Once you do that, you’ll find that running npm run build then npx serve -s dist will actually show your site, and thus that it’ll work on Netlify too.

1 Like