Next.js Discord

Discord Forum

Prerender errors in Pages Router after upgrading Next.js 14 -> 16 (Mixed Router Setup)

Unanswered
Alligator mississippiensis posted this in #help-forum
Open in Discord
Alligator mississippiensisOP
Recently moved from Next.js 14 to 16 and I'm hitting constant prerender errors on my legacy Pages Router files.

I'm seeing errors like alert is not defined or issues with useState and router as if the build is ignoring the client-side context. Usually, a rebuild fixes it, but today I had to manually touch the code to fix the build.

Has anyone else noticed the Pages Router becoming less stable in v16? Does fixing this require going through every single page, or is there a broader configuration fix I might be missing?

Would appreciate any insights or shared experiences!

0 Replies