I am currently trying to publish a nextJS site to netlify, but it shows a 404, link here:
It is a mono-repo with a root, that contains frontend and backend folder:
** backend →
** frontend →
So in the netlify UI I changed the base directory to “frontend”. And Publish Directory to “frontend/.next”
It is installing the dependencies and the “tree” during build that comes up when building next apps can also be seen in the logs.
I already tried to use the two variations of build command mentioned in the documentation for monorepos. It is not helping.
When i download the directory I can see that there is no index.html.
Thanks in advance
Thanks for reaching out and welcome to the Netlify Support Forums!
We have a general Support Guide on Page Not Found errors here that may help:
We attempt to serve only /index.html in case you try to load your site without a path, for example:
The easiest way for you to see what files your build sent us is to download a copy of the deploy, available from the deploy’s logs page as per this screenshot:
When you check this, be aware that EACH deploy has this page and icon, so you can download a copy of ANY deploy. For debugging problems with your live site, make sure it says “Published Deploy” on the …
I also found this recent post with a similar
issue, if you could try clarnx’s suggesting if the first Support Guide doesn’t help.
If you have any questions, please let us know.
Thank you for the response and the links.
I am afraid non of these helped, I looked at them beforehand and checked again now, but I still would not know what I did wrong.
I have a different site deployed on netlify (also with nextjs) and whenenver I download that, there is a index.html file created in the zip. On this repo no index file is created, but I can not find out why. I think that this is the problem
If those suggestions did not work, can you please share your repository as well as your most recent deploy log? We will need those details in order to investigate further.