Error occurred prerendering page "/404" and sometimes /500
Unanswered
Asiatic Lion posted this in #help-forum
Asiatic LionOP
After updating to the latest version I've been getting these errors all of a sudden
Which is kind of strange, since everything worked fine before. It's also kind of weird that it seems to be happening randomly, between 404 and 500. I stripped down my not-found and error page to bare essentials, yet the errors continue, which led me to believe it's some issue with next itself.
[TypeError: Cannot read properties of null (reading 'useContext')]
app:build: Error occurred prerendering page "/404". Read more: https://nextjs.org/docs/messages/prerender-error
Which is kind of strange, since everything worked fine before. It's also kind of weird that it seems to be happening randomly, between 404 and 500. I stripped down my not-found and error page to bare essentials, yet the errors continue, which led me to believe it's some issue with next itself.
3 Replies
@Asiatic Lion After updating to the latest version I've been getting these errors all of a sudden
ts
[TypeError: Cannot read properties of null (reading 'useContext')]
app:build: Error occurred prerendering page "/404". Read more: https://nextjs.org/docs/messages/prerender-error
Which is kind of strange, since everything worked fine before. It's also kind of weird that it seems to be happening randomly, between 404 and 500. I stripped down my not-found and error page to bare essentials, yet the errors continue, which led me to believe it's some issue with next itself.
West African Crocodile
Did you figure this out? Getting it on a brand spanking new project
@West African Crocodile Did you figure this out? Getting it on a brand spanking new project
Asiatic LionOP
Sorry dude, I really don't remember what it was
@Asiatic Lion Sorry dude, I really don't remember what it was
West African Crocodile
Ended up being my monorepo, having different react versions