-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[🐛 Bug]: generateStaticParams forces to be on the edge on nested routes. #899
Comments
After some more testing I found out that when using @cloudflare/[email protected]...@cloudflare/[email protected] |
I have same issue |
same here |
same |
1 similar comment
same |
Same :/ |
I was able to get it working by setting #:schema node_modules/wrangler/config-schema.json
name = "my-test-site"
compatibility_date = "2024-12-05"
compatibility_flags = ["nodejs_compat"]
pages_build_output_dir = ".vercel/output/static" |
The above fix didn't work for me. Issue seems to occur starting from https://github.com/vercel/vercel/releases/tag/[email protected], where I'm getting an issue when building static routes without Error occurs in a path Could be related to #833 -- for now I stick to https://github.com/vercel/vercel/releases/tag/[email protected]. |
yes, the same worked for me. |
What nexths and next-on-pages version are you using? I've tried downgrading vercel to 34.4.0, but with latest 1.13.7 next-on-pages version I still get an error about edge runtime. |
Ah yes -- I forgot to mention, I'm using |
next-on-pages environment related information
Description
When deploying a Next.js application on Cloudflare Pages with
@cloudflare/next-on-pages
, dynamic routes using static parameters (e.g.,[locale]
for language-based URLs) experience unexpected build errors if they contain nested routes. Specifically, routes like/[locale]/page.tsx
(e.g.,/en
,/nl
) build and render correctly. However, nested pages such as/[locale]/test/page.tsx
(e.g.,/en/test
,/nl/test
) fail to build unless configured to use the Edge Runtime by exportingexport const runtime = 'edge';
.This requirement appears to be a misconfiguration in
@cloudflare/next-on-pages
, as the Edge Runtime should not be mandatory for these routes. This issue does not occur when deploying the same Next.js app structure to Vercel, where dynamic and nested routes function without needing the Edge Runtime, as expected.Expected Behavior:
Both
/[locale]/page.tsx
and/[locale]/test/page.tsx
routes should build and render without requiring the Edge Runtime. These routes work as expected in a Vercel deployment, with dynamic and nested routes rendering without Edge Runtime configuration. The requirement for the Edge Runtime on Cloudflare Pages is unexpected and blocks deployment for dynamic, multi-language route structures.Observed Behavior:
The build fails for nested dynamic routes unless the Edge Runtime is explicitly set, which should not be necessary and deviates from typical Next.js behavior on other platforms. This leads to inconsistencies between platforms and prevents successful deployment on Cloudflare Pages for standard Next.js dynamic route setups.
Reproduction
Pages Deployment Method
None
Pages Deployment ID
No response
Additional Information
Would you like to help?
The text was updated successfully, but these errors were encountered: