TypeError: Cannot read properties of null (reading 'useContext')
Hey Guys,
I'm experiencing an issue with my builds as of today.
I went through the issues on GH and even implemented the changes merged in[https://github.com/t3-oss/create-t3-app/pull/1741] but i still could not get the issue to go away.
Some context:
- The project is a Monorepo (T3-Turbo)
- Almost all my TRPC routes use cookies
- I have 2 TRPC providers per app (1 app specific, 1 shared)
- The app is deployed on Azure App Service, not Vercel
What i've tried:
- Adding 'export foce-dynamic' --did not help
- in RSC components adding 'unstable_noStore' -- did not help
- applied changes from PR #1741 - did not help
ANY help would be appreciated
all the pages according to the build log that have dynamic usage
4 Replies
Ok so, It seems like it the issue is not the dynamic server usage but:
the issue is I don't have a 404 error file defined. I use the default built in one.
Have you ever solved this?
I've had this same problem for months and I'm reaching my limit lol
Same
Yo, little update here. I saw some people saying this error is related to some node modules using the wrong version of React.
POSSIBLE FIX: I've added this to my package.json and haven't had this error in a day, will update again in the future:
make sure it suits the react version of your project