Hi everyone, originally when deploying my website, after a successful deployment, I would get a 404 error page. Did some debugging and now having a new issue. My website brings me to a blank page. Looked at the console and removed somethings that were causing errors and now my console is error free ( but still with the blank page ). But besides that, from the looks of it, it is displaying my index.html because I can see my text in the noscript tag when I use the inspect tool. If someone can help me better understand why it is not displaying the project.
thank you very much. that worked! If you have time, can you explain to me why the publish directory would be todo/build? specifically /build? That was the only part that I had to change. Just unsure why it would be build since I do not have anything build in my directory.
Hi @Lexx426, You are welcome. Glad to know my suggestions helped solve the problem.
Based on the Netlify Framework Integrations documentation page below, Netlify requires that you specify the publish directory as build for React applications. You can read more in the documentation link below
Netlify will publish to the CDN whatever you tell it to, by telling it to publish public it does just that, and publishes only the unprocessed index.html file which does not contain a <script> tag and thus will appear blank as you discovered.
The build folder is created when npm run build is executed, and since it contains your build output, it is what needs to be deployed.
You can test this by running the project locally with npm run build and you’ll see that the build folder is created.
thank you! I have made other projects with react before. I dont remember changing it to build but I will look at my other projects to see if it just went over my head today!! Thank you though for your help.