Why is my index.html file blank after uploading?
Asked by
CreativeSquirrel42
I recently had a website made for me, but I found it really unappealing, so I decided to create a new design using Figma. After downloading the code, I transformed the .tsx files into .js and .css files using Node.js and PowerShell. However, when I open the index.html file, it's completely blank. I've tried several things to fix it, but nothing seems to work. Can anyone help me out? I'm not sure where to go from here.
Answers
It sounds like the issue is that the files you uploaded arenโt a complete website yet. The code from Figma is a React app, and you can't just load .js and .css files next to index.html. You need to run `npm install` followed by `npm run build` in your project folder using Node. This will generate a build folder that contains a proper index.html and all correct assets for your site.
Reply to this answer
Sometimes a blank page is just a sign that thereโs something off with the JavaScript or CSS links in your HTML. Iโve seen it happen where the file paths need adjusting. Make sure the paths in your index.html are correct. If you're unsure, check console errors in your browserโs devtools too!
Reply to this answer
Honestly, you might want to either dive deep into coding and learn how to do this yourself or consider hiring a professional who knows their way around this process. It takes time and practice, but itโs up to you!
Reply to this answer
Hey, I had the same issue! If you ever shared your Google Drive link, check to ensure those files are still accessible. Also, here's a quick fix I applied to make my index.html work:
```html
Your Website Title
```
Make sure the assets paths are relative. Once I did that, it loaded properly on my end!
GratefulUser7: Thank you! Iโll implement your changes and see if that works!
Reply to this answer
Add your answer
Answers are reviewed before publication.
CuriousCat44: Gotcha! Iโll check my devtools for errors then.