Minified React error #31 after upgrading to Next 15 #73761
Replies: 7 comments 19 replies
-
I was getting this yesterday, when I tried to build someone else's project. Upgrading to |
Beta Was this translation helpful? Give feedback.
-
My new Next.js 15 project is located in a monorepo. After moving it out and building it separately, it worked fine. |
Beta Was this translation helpful? Give feedback.
-
Try removing The way I tested this:
|
Beta Was this translation helpful? Give feedback.
-
Just to report back, it was this repository, https://github.com/eknkc/ssr-benchmark, that when upgrading to Next 15, the root, and |
Beta Was this translation helpful? Give feedback.
-
I'm encountering this error again. For a while, the error didn't occur, but now it's back. I tried deleting the node_modules folder and reinstalling everything, but it didn't help. I'm using Next.js version 15. What’s strange is that 20 commits ago, I was building the project without any issues on each commit, but now the error appears on every commit. Any ideas on what might be causing this? |
Beta Was this translation helpful? Give feedback.
-
I'm having this issue when trying to build a fresh nextjs app in a monorepo (using bun workspaces, but I tried a vanilla npm workspace as well). Downgraded to 14.2.24, which works. |
Beta Was this translation helpful? Give feedback.
-
For those who don't want to downgrade next or react, and don't use the pages router, and are only getting this error prerendering page "/404" and "/500", this error is coming from Specially, here: next.js/packages/next/src/export/routes/pages.ts Lines 114 to 126 in b8ee3ce So I just patched this file by commenting out the following line: And I get a successful build. If you're ok with having empty "/404" and "/500" pages and don't mind potential pitfalls of having mixed React versions, you can try doing the same. |
Beta Was this translation helpful? Give feedback.
-
Summary
After running
npx @next/codemod@canary upgrade latest
to upgrade from Next 14 to 15, I can't build my project withnext build
:The closest things to an hint I can get from this is a mention of a "/404" page, which I do not have in my project. What should I do?
Additional information
Beta Was this translation helpful? Give feedback.
All reactions