-
Notifications
You must be signed in to change notification settings - Fork 133
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]: Cloudflare Pages build fails with custom Error component when using the Pages directory #174
Comments
Thanks a bunch for the issue @atrout, I've had a quick look and unfortunately it seems like Vercel creates a node function for the I'll open an issue there and try to see if there is a workaround we can adopt (but I am not sure if there is actually anything we can do about it on our side 😓) |
Thanks for looking at this. We found a workaround using the |
I've created an issue in the Next repository: vercel/next.js#48490 We'll have to see what they say, I tried thinking of something but I'm afraid that we can't do much about this on our side 😓 |
I've updated the issue title as it seems like this is actually an issue only with the Pages routing, within the App directory error pages seem to work fine 🙂 😅 |
Has anyone found a workaround for this issue yet? App router isn't an option for us since it doesn't play well with wagmi or trpc installs. Trying to switch to cloudflare but this is a 100% blocker for us. |
Is anyone also experiencing this issue with the app router? I don't actually have a custom error file (either |
@isaacholt100 sorry to hear you're having issue... this custom error issue is quite problematic 😓 do you have an |
Yes I do have a |
No problem 🙂 (although it's not a great solution, we'll have to find something better 😓) |
Hi @dario-piotrowicz, |
@requiemcreatif thanks for confirming that, yeah it's some weird Vercel behavior unfortunately 😓 |
I had the same issue @isaacholt100 mentioned about _error when declaring getInitialProps in _app.tsx. Let me know if there is a workaround in my case. |
I am also forcing the same issue on pages router with _error.tsx and nextjs 13 :( |
For me it fails the build even when no Maybe related to #413. |
- deleted `not-found.tsx` per cloudflare/next-on-pages#413 and cloudflare/next-on-pages#174 - added `export const runtime = 'edge';` to all `layout.tsx` files
- deleted `not-found.tsx` per cloudflare/next-on-pages#413 and cloudflare/next-on-pages#174 - added `export const runtime = 'edge';` to all `layout.tsx` files
- deleted `not-found.tsx` per cloudflare/next-on-pages#413 and cloudflare/next-on-pages#174 - added `export const runtime = 'edge';` to all `layout.tsx` files
- deleted `not-found.tsx` per cloudflare/next-on-pages#413 and cloudflare/next-on-pages#174 - added `export const runtime = 'edge';` to all `layout.tsx` files
- deleted `not-found.tsx` per cloudflare/next-on-pages#413 and cloudflare/next-on-pages#174 - added `export const runtime = 'edge';` to all `layout.tsx` files
- deleted `not-found.tsx` per cloudflare/next-on-pages#413 and cloudflare/next-on-pages#174 - added `export const runtime = 'edge';` to all `layout.tsx` files
- deleted `not-found.tsx` per cloudflare/next-on-pages#413 and cloudflare/next-on-pages#174 - added `export const runtime = 'edge';` to all `layout.tsx` files
- deleted `not-found.tsx` per cloudflare/next-on-pages#413 and cloudflare/next-on-pages#174 - added `export const runtime = 'edge';` to all `layout.tsx` files
- deleted `not-found.tsx` per cloudflare/next-on-pages#413 and cloudflare/next-on-pages#174 - added `export const runtime = 'edge';` to all `layout.tsx` files
How do you actually apply this fix? @atrout |
Hello 👋🏽 I've added runtime config for the dynamic routes, and it worked even Added this
|
Cli version
0.8.0
Next.js related information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 21.6.0: Mon Dec 19 20:43:09 PST 2022; root:xnu-8020.240.18~2/RELEASE_ARM64_T6000 Binaries: Node: 16.20.0 npm: 8.19.4 Yarn: N/A pnpm: 8.1.1 Relevant packages: next: 13.1.6 eslint-config-next: 13.1.6 react: 18.2.0 react-dom: 18.2.0 warn - Latest canary version not detected, detected: "13.1.6", newest: "13.3.1-canary.6". Please try the latest canary version (
npm install next@canary
) to confirm the issue still exists before creating a new issue. Read more - https://nextjs.org/docs/messages/opening-an-issueVercel version
28.18.3
Description
I'm getting an error from next-on-pages when it attempts to produce a Cloudflare Pages build:
This is the content of the _error.tsx page (it is taken directly from these instructions on how to configure Sentry with nextjs):
If I change the config to
export const config = { runtime: 'edge' };
I see the same error.Reproduction
No response
Additional Information
No response
Would you like to help?
The text was updated successfully, but these errors were encountered: