Hi All,
I am trying to deploy single spa application but it says “Page not found” https://gallant-bartik-47bb90.netlify.app/
I executed npm run build
command on the app and it created a “dist” folder which i have uploaded on netlify to deploy the app.
It is just frontend app, without any database or backend connection.
Is there any other thing which needs to be done to deploy the app ?
Hi there, @Aniket_Harshe
Welcome to the Netlify Forums! Good question. Do you have an index.html? We often find that this is the cause of this error.
I suggest reading this support guide as well as some of the follow up comments to see if it gets you on the right track!
Last reviewed by Netlify Support - August, 2023
Netlify attempts to lookup a file based on several xor filters, and when all of these fail, we end up serving a 404 page. For example, a request made to /example/ would check /example/index.html, /example.html, /example/home.html and several other combinations (not necessarily in the same order) before hitting the 404. However, in case you were not expecting a 404 at a particular URL, you might be interested in finding out the reason and potentia…
Let us know!
Hi,
I have added index.html file in my folder and also added _redirect but now i am getting blank page https://wonderful-jennings-b76f9a.netlify.app/
Am i missing something?
Hi @Aniket_Harshe ,
Your publish directory should probably be build
, but you’re publishing public
.
I have published the build folder which was created, it didn’t have index.html so i copied it from public folder and added to build folder
That’s the problem right then. You need to generate an index.html
during build. If you check the source code of the HTML file you’ve currently published, you’d get your answer of why it’s blank.
1 Like