-
Notifications
You must be signed in to change notification settings - Fork 124
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]: Dynamic Pages / Routes can't deploy to Cloudflare Pages #745
Comments
same , the dynamic routes with |
facing the same issue, any solution? |
Personally, I switched back to Vercel, at least for now. They support Next.js natively, and apply some nice features e.g. image optimization that Cloudflare Pages doesn't support. |
This is straight out of the docs but it doesn't work for me. |
For me, it was working one month ago thanks to |
After digging, it seems the issue I have is currently being fixed: #833 |
Hm. Will this ever be compatible with next on pages? You really gotta jump through a lot of hoops to get something similar on CF. |
facing the same issue, any solution? But :( ⚡️ ERROR: Failed to produce a Cloudflare Pages build from the project.
⚡️
⚡️ The following routes were not configured to run with the Edge Runtime:
⚡️ - /api/v1/ssg/[slug]
⚡️
⚡️ Please make sure that all your non-static routes export the following edge runtime route segment config:
⚡️ export const runtime = 'edge';
⚡️
⚡️ You can read more about the Edge Runtime on the Next.js documentation:
⚡️ https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes |
Seen this? Solved my issue. |
next-on-pages environment related information
Relevant Packages:
@cloudflare/next-on-pages: 1.11.0
vercel: N/A
next: 14.1.4
Description
I'm currently building a website with Next.js 14 and Prismic.io CMS. It seems like there's an issue with Dynamic Pages / Dynamic Routes on Cloudflare Pages deploy.
When deployed to Vercel or running locally, my app works flawlessly.
On Cloudflare Pages deploy, the pages are marked correctly as
λ (Dynamic) server-rendered on demand using Node.js
, but the deploy fails:When I add
export const runtime = 'edge'
to my failingpage.tsx
(although it should work under node.js default runtime, and it does so on Vercel), the page deploys succesfully asℇ (Edge Runtime) server-rendered on demand using the Edge Runtime
.Now trying to access the page, I'm getting this error:
Reproduction
Run a Next.js 14 (App Router) app with Dynamic Pages, and Prismic.io CMS in my case. Try deploying to Cloudflare Pages. Example code.:
Pages Deployment Method
Pages CI (GitHub/GitLab integration)
Pages Deployment ID
0a8c872 and 114366d
Additional Information
Found a similar issue here, but unable to fix: #32 and #35
Would you like to help?
The text was updated successfully, but these errors were encountered: