-
Notifications
You must be signed in to change notification settings - Fork 26.3k
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
Error occurred prerendering page "/_not-found" with pageExtensions option #65447
Comments
I have suddenly the same error. There were no changes made and this error happens when deploying the application.
|
I went spelunking in the code, and this looks suspicious to me: next.js/packages/next/src/server/app-render/app-render.tsx Lines 693 to 694 in c1f8d93
This non-null assertion means next.js/packages/next/src/server/app-render/app-render.tsx Lines 944 to 951 in c1f8d93
My guess is that this issue was introduced here: #64313 But I definitely don't have enough knowledge or context to confirm that or offer a suggestion on how to fix this |
Another thing I found — after running a build, looking at the # notice that a file shows up for every page entry
# but is missing for the not-found page
find .next/ -path '*client-reference-manifest.js' I'm guessing that this missing file corresponds to an undefined When I downgrade to v14.1.4, I see a couple of differences:
I now think this bug was caused by #62679 |
Maybe this next.js/packages/next/src/build/webpack/plugins/flight-client-entry-plugin.ts Lines 349 to 352 in c1f8d93
|
Here's a minimal reproduction https://github.com/awmottaz/next-typeerror-not-found |
I have the same issue, builds fine locally but on Vercel I get this error:
|
Since today the build suddenly succeeds... must've been something related to Vercel? |
Not Vercel. I'm struggling with local builds and our AWS server is spitting out the same error too |
Downgraded to 14.1.4 from my package.json, and I can confirm I no longer see the following error:
|
experiencing same issue after upgrade to 15-rc |
What version is working for you? |
I think my problem was that I was having page.tsx inside an |
thank you for the quick reply. I don't have my index page inside a folder. But again would help to know what version you're using of 14 or if it's a canary of 15? |
I'm using latest 14 |
I get a similar error... I should also mention that im using next-intl Generating static pages (0/7) [ ]Error Error occurred prerendering page "/_not-found". Read more: https://nextjs.org/docs/messages/prerender-error Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error ✓ Generating static pages (7/7)
|
@riccardolardi So 14.2.4 and are you using page extensions like OP? |
Yes, but no page extensions |
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/misty-glade-yh92cc
To Reproduce
After update to 14.2.* version, when i use
pageExtensions
innext.config
, i got an error while try to build my appi have in my
app
folder all files with.page.tsx
-Current vs. Expected behavior
Build app fail with
pageExtentions
optionProvide environment information
Operating System: Platform: linux Arch: x64 Version: #29~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr 4 14:39:20 UTC 2 Available memory (MB): 15622 Available CPU cores: 12 Binaries: Node: 20.12.2 npm: 10.5.0 Yarn: 1.22.19 pnpm: N/A Relevant Packages: next: 14.2.3 // Latest available version is detected (14.2.3). eslint-config-next: 14.2.3 react: 18.2.0 react-dom: 18.2.0 typescript: 5.4.5 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: