Next.js Discord

Discord Forum

Next.js 15.5.0 / 15.4.7 Build Error

Answered
Satin posted this in #help-forum
Open in Discord
SatinOP
Hello, after upgrading from Next.js 15.3.1 to 15.4.7 (I've also tried 15.5.0), my app no longer builds. It errors with
[TypeError: Cannot read properties of null (reading 'useContext')]
Error occurred prerendering page "/404". Read more: https://nextjs.org/docs/messages/prerender-error
[TypeError: Cannot read properties of null (reading 'useContext')]
Export encountered an error on /_error: /404, exiting the build.
 ⨯ Next.js build worker exited with code: 1 and signal: null
. I only have the standard global-error.tsx file, with no custom 404 pages
Answered by Satin
Nvm, the issue was with @sentry/nextjs (updating to the latest version fixes this)
View full answer

1 Reply

SatinOP
Nvm, the issue was with @sentry/nextjs (updating to the latest version fixes this)
Answer