Samiul Islam
Samiul Islam

Reputation: 33

I made an React app with React + Vite and deployed in Cpanel but it shows blank screen. How do I fix it?

I'm new to React and I build react apps using React + Vite app. My projects run perfectly in development mode. I build an app using npm run build command. I get a 'dist' folder which is absolutely fine.

The problem is that when I deploy the dist folder in Cpanel I get a blank page on the webpage. No content is there inside <body> </body> of html when I inspect the page. Why is this happening and how do I fix it? help me :'(

Upvotes: 1

Views: 768

Answers (1)

Samiul Islam
Samiul Islam

Reputation: 33

yeah I changed the path (removed "/") in the index.html and it worked. thanks!

Upvotes: 0

Related Questions