For Workers & Pages, what is the name of the domain?
attribution-dash-test.pages.dev
What is the issue or error you’re encountering
After deploying my Next.js application (which uses dependencies requiring Node.js APIs, like Supabase SSR for middleware), I receive the following runtime error when visiting the site: Node.JS Compatibility Error no nodejs_compat compatibility flag set. The core problem is that the nodejs_compat compatibility flag is not visible or selectable in my Pages project settings under Settings → Functions → Compatibility Flags. The only related flags I see are nodejs_compat_populate_process_env and nodejs_compat_do_not_populate_process_env.
What steps have you taken to resolve the issue?
-
Enabled Next.js Preset: Confirmed the “Next.js” framework preset is selected in the Pages project settings. This correctly sets the build command (npx @cloudflare/next-on-pages@1) and output directory (.vercel/output/static).
-
Set Compatibility Date: Set a recent Compatibility Date (April 28th, 2025) under Settings → Functions → Compatibility Date.
-
Checked UI Repeatedly: Double- and triple-checked the Settings → Functions → Compatibility Flags section in the dashboard UI. The nodejs_compat flag is definitely not listed as an option to enable.
-
Attempted wrangler.toml: Created a wrangler.toml file in the project’s root directory (/dashboard) containing name = “attribution-dash-test”, compatibility_date = “2024-10-01”, and compatibility_flags = [ “nodejs_compat” ].
-
wrangler.toml Ignored: The Pages build log showed this file was found but ignored because it wasn’t considered a valid Pages configuration file (A wrangler.toml file was found but it does not appear to be valid… Skipping file and continuing.). The nodejs_compat flag was therefore not applied.
-
Removed wrangler.toml: Deleted the wrangler.toml file and redeployed to avoid confusion, confirming the error still persists without it.
My Question:
How can I enable the required nodejs_compat flag for my Cloudflare Pages project when it is not appearing as an option in the dashboard UI under Compatibility Flags? Is there an alternative method, a known UI issue, or something else I might be missing?
Thanks for any assistance!