Site is live, but sill blank screen (react app)

@shino80 There may be multiple issues, but the first one I see is code that is broken.

image

It presumes the user will have a localStorage value which they may not have.

You should debug your code and ensure it works with a fresh session.

thank you very much, I fixed it and it works.

@carlos_c There’s an error shown in the developer console:

Argh, I accidentally deleted my post. Yes I see the error now. I actually went ahead and started a new vite boilerplate copied everything over, ran it step by step and it works. Thank you!

Thank you so much. It worked

Hi,

My page showed blanc aswell. This is the error in the console.

“/src/main.jsx:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of “application/octet-stream”. Strict MIME type checking is enforced for module scripts per HTML spec.”

Link website: https://resonant-cat-43f175.netlify.app/

@d41 I presume you’ve already fixed the issue with your project, as the site instance that you’ve linked no longer exists.

Site is live, but still blank screen (react app)

I deployed my react app on netlify, I managed to publish the site but when I go to the link (https://cryptoverse2024.netlify.app/) - it’s just a blank page
Here is the github repo I’m trying to deploy: GitHub - Amanpremyadav/Cryptoverse: I have built this cryptocurrency app using Reactjs with Redux Toolkit and Ant Design, this cryptocurrency website aggregates data from Coinranking, CoinGecko, and NewsAPI. I have used RTK Query for efficient API fetching. Experience seamless state management and a user-friendly interface for all your cryptocurrency needs.

@Amanpremyadav I presume you’ve fixed your issue as your site works fine:

Yes I have fixed the issue Thank you

How did you fix it?
I’m having the same issue now but i used typescript with my application

There is no “one fix” for issues like this, you would need to provide more detail for your specific site.

However the first step to fixing a ‘blank screen’ is usually to open the developer console and check if there are any errors.

This is my netlify site https://atdigitalwebappreact.netlify.app. In my local server it works properly, but when i upload i to netlify the whole middle part is blank and only TopNavigation and some part only visible. This is git repository link GitHub - ashanearangalla/atdigitalweb. I’ve been trying to fix this since yesterday. How can I fix this.

@ashanearangalla This isn’t an issue with hosting on Netlify.

Something about your build is causing it to perform differently from the output of the Build command compared to your Develop command.

npm run start

npm run build && npx serve -s build

I cannot advise what, you’ll need to debug your build.

You can check it locally with npm run build && npx serve -s build