jherr
jherr•2y ago

ConvexProviderWithClerk not providing convex client

I looked through the code and it seems to be doing the right thing. But I've had to add another ConvexProvider to get the useQuery and useMutation hooks to work.
<ClerkProvider publishableKey="...">
<ConvexProviderWithClerk client={convex}>
<ConvexProvider client={convex}>
<App />
</ConvexProvider>
</ConvexProviderWithClerk>
</ClerkProvider>
<ClerkProvider publishableKey="...">
<ConvexProviderWithClerk client={convex}>
<ConvexProvider client={convex}>
<App />
</ConvexProvider>
</ConvexProviderWithClerk>
</ClerkProvider>
6 Replies
ballingt
ballingt•2y ago
@jherr that's weird, what version of Clerk and Convex are you're using?
jherr
jherrOP•2y ago
"@clerk/clerk-react": "^4.20.5",
"convex": "^0.17.1",
"@clerk/clerk-react": "^4.20.5",
"convex": "^0.17.1",
just created it yesterday, so pretty recent. 🙂
Michal Srb
Michal Srb•2y ago
This was likely caused by node modules, for anyone running into this I'd suggest deleting node_modules and rerunning npm install (or equivalent)
Hel
Hel•11mo ago
@Michal Srb Hi I use vercel and I have the same error. I was redeploy but the error not gone. Do you have any advice for me?
Michal Srb
Michal Srb•11mo ago
@Hel can you open a new thread with details of what you’re seeing? Are things working in dev? Include snippets of your code.
Hel
Hel•11mo ago
Thanks you answer, i was fix the problem. the error cause by wrong config

Did you find this page helpful?