TypeError: Cannot read properties of undefined (reading 'clientModules')
Unanswered
Masai Lion posted this in #help-forum
Masai LionOP
HHitting this error on multiple pages. When I was using next@14.0.4 the error was
TypeError: Cannot read properties of undefined (reading 'ppr'). I downgraded to 14.0.1 and now get multiple instances of
TypeError: Cannot read properties of undefined (reading 'clientModules') on the page. THis is only on localhost production build. npm run dev works fine. vercel --prod, the page also works fine. This is only broken on localhost production but I need the page to work so I can fix a different bug that works ok on npm run dev but breaks on vercel.
TypeError: Cannot read properties of undefined (reading 'ppr'). I downgraded to 14.0.1 and now get multiple instances of
TypeError: Cannot read properties of undefined (reading 'clientModules') on the page. THis is only on localhost production build. npm run dev works fine. vercel --prod, the page also works fine. This is only broken on localhost production but I need the page to work so I can fix a different bug that works ok on npm run dev but breaks on vercel.
7 Replies
Toyger
try to remove
.next
folder before buildThrianta
Hii, were you ever able to fix this?
For me it's the opposite where everything works locally, it does not work on vercel after deploying it
I've tried :-
1. Re-deploying after removing cache
2. Upgrading nextjs version
The error still seems to persist and only on a single server rendered page for some reason
For me it's the opposite where everything works locally, it does not work on vercel after deploying it
I've tried :-
1. Re-deploying after removing cache
2. Upgrading nextjs version
The error still seems to persist and only on a single server rendered page for some reason
I am also facing this issue. @Masai Lion , did you have a chance to fix this issue?
Another weird issue is that I am using Next.js v14.1.0, but I don't know where the
Next.js 13.5.6
come from...🤔
I fixed this issue. I was using
bun
runtime instead of npm
, yarn
or pnpm
, and I just tried to upgrade bun
to the latest, deleted node modules, re-installed, and it solved the issue. 🙂