Skip to content

Cannot read property 'useContext' of null #33

@eliotgevers

Description

@eliotgevers

I am setting up Convex + Expo + Clerk (monorepo), and I am running into the following issue:

 ERROR  [TypeError: Cannot read property 'useContext' of null] 

Code: ConvexClientProvider.tsx
  16 |   return (
  17 |     <ClerkProvider publishableKey={publishableKey} tokenCache={tokenCache}>
> 18 |       <ConvexProviderWithClerk client={convex} useAuth={useAuth}>
     |       ^
  19 |         {children}
  20 |       </ConvexProviderWithClerk>
  21 |     </ClerkProvider>
Call Stack
  ConvexClientProvider (apps/mobile/app/ConvexClientProvider.tsx:18:7)
  RootLayout (apps/mobile/app/_layout.tsx:56:5)

I am following the official docs: by Convex and by Clerk. Both give this error.

Could you update this template to the latest versions and check if the same issues occur? I have currently not found a way to resolve this issue.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions