You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importdynamicfrom'next/dynamic';exportconstruntime='edge';exportdefaultfunctionNotFound(){return<div>Not found page...</div>;}
error:
⚡️ ERROR: Failed to produce a Cloudflare Pages build from the project.
⚡️
⚡️ The following functions were not configured to run with the Edge Runtime:
⚡️ - _error.func
Reproduction
No response
Pages Deployment Method
Pages CI (GitHub/GitLab integration)
Pages Deployment ID
No response
Additional Information
No response
Would you like to help?
Would you like to help fixing this bug?
The text was updated successfully, but these errors were encountered:
Hey there, please could you try removing the edge runtime opt-in for your not-found.js file?
Error pages have notoriously been rather problematic with the edge runtime with Next.js. In the pages directory, they didn't really work. In the app directory, there is some odd behaviour.
In this case, I just tried building a project with a root-level not-found.tsx file and it errored when I opted it into the edge runtime. However, when I removed the edge runtime export from the file, it succeeded because it was statically generated. 🙂
Adding a default app router not-found error page in production. We introduced a custom global not-found page if you have not-found.js file under app directory.
I'm closing this issue as it seems like everything here is also included in #413, and all conversations seem to be happening there at this point, so I don't think there is too much point in keeping this issue open and we should just use #413
@anonymouscatcher I hope this is fine, please let me know if you disagree and we can reopen this one 🙂🙏
next-on-pages environment related information
System:
Platform: darwin
Arch: x64
Version: Darwin Kernel Version 22.5.0
Binaries:
Node: 18.16.0
Yarn: 1.22.10
npm: 9.5.1
pnpm: N/A
Package Manager Used: yarn (classic)
Relevant Packages:
@cloudflare/next-on-pages: 0.10.1
vercel: N/A
next: 13.4.2
Description
error:
Reproduction
No response
Pages Deployment Method
Pages CI (GitHub/GitLab integration)
Pages Deployment ID
No response
Additional Information
No response
Would you like to help?
The text was updated successfully, but these errors were encountered: