DNS_PROBE_FINISHED_NXDOMAIN and then HTTP ERROR 404
I am not sure why this is happening, I run it locally with npm run dev and it works perfectly, the build goes perfectly on cloudflare, then when I actually go to the site it initially gives a DNS_PROBE_FINISHED_NXDOMAIN error, then goes to HTTP ERROR 404 after like 5 minutes.
I got a whole lotta nothin tbh. Everywhere I look it says that Cloudflare isn't even supposed to give 404 errors.

20 Replies
Everywhere I look it says that Cloudflare isn't even supposed to give 404 errors.For normal proxy errors 404s would always come from origin. This isn't normal proxy usage though, this is Cloudflare pages What do your uploaded files look like? Do you have an
index.html
in the root, or are using a server-side generated framework?Website is built with Next.js, my home page is defined in the app/page.tsx file
so server-sided yeah
Are you using next on pages, and set it up with their functions and such? https://developers.cloudflare.com/pages/framework-guides/nextjs/ssr/get-started/
Cloudflare Docs
Get started | Full-stack (SSR) | Next.js apps · Cloudflare Pages docs
Deploy a full-stack Next.js app to Cloudflare Pages
you can see it's not building your website, just serving the files: https://lz-website.pages.dev/app/page.tsx
Probably missing the build command + some other stuff
I am like 28% sure it is in fact building

one step down, is your build output directory set right then?
The next.js preset has
.vercel/output/static
pages project -> settings -> build -> build configurationI have nothing
just a /
I should probably put an out there
are you using the next.js preset or what's your build command?

in package.json what's the script for
build
"build": "next build",
not setup for next on pages
yeahhhh
I should probably do that
I'd try the Next.js framework preset and see. I'm no next.js expert but I know there's a good number of limitations next-on-pages has
Have to use Edge ssr, not node.js, for example
trying rn
ok
good news and bad news
good news is it deployed
bad news is it deployed with around 50 warnings 78 memory leaks and 99% of the code is probably terrible
yeah gotta fix stuff rip

ahh yea opps, that's easy though, can just add under settings -> runtime (near the bottom ) -> compat flags and trigger a rebuild
none of that will stop it from running
shall do
website will either explode upon opening or die trying
looks like it works
it does indeed
tea of the why
cant believe i didnt think of using nextjs preset when using nextjs
W brain right here