Failed to load resource 404 and pages moved to dist/page_url

hello guys
my website
i suddenly started getting error 404 on my pages
and failed to load resources 404 in my home page
even if my deploys shows no errors

after some digging i found out that my pages suddenly became accessible from /dist/page_name
example page : https://maisonfabiencarrichon.ch/dist/notre-maison-de-beaute-fabien-carrichon

the only change i did from my last working deploy is some css changes

Also seeing this issue

Hi @uchihadigital, thanks for the post and welcome.

If possible can you share the repository of the site you are trying to deploy for me to help with the debugging?
Thanks.

this is the repo

i made it work by deleting netlify.toml file
which only contained

[build]
  publish = ".next"
  command = "next build"

i dont understand how that fixes the problem

Hi @uchihadigital, good to know you were able to fix the problem.

Netlify can auto detect the framework you use and then apply the appropriate build settings.