I've been developing a thread video from JS Mastery and got hit by this error:
- error node_modules\@clerk\shared\dist\esm\hooks\createContextAndHook.js (4:0) @ assertContextExists
- error Error: ClerkInstanceContext not found
null
can anyone help me?
I tried a lot of things but nothing seems to resolve my problem
Have you checked if the <ClerkProvider/> component has been correctly set up in your application? As per the documentation, It is recommended that the <ClerkProvider> wraps the <body> to enable the context to be accessible anywhere within the app.
<ClerkProvider>
<html lang="en">
<body className={inter.className}>{children}</body>
</html>
</ClerkProvider>
Turns out i was also facing the same issue and as the user "user17978165" has mentioned above haed to app/root/layout.tsx and update the code to
<ClerkProvider>
<html lang="en">
<body className={inter.className}>
<Topbar/>
<main>
<LeftSidebar/>
<section className='main-container'>
<div className="w-full max-w-4xl">
{children}
</div>
</section>
<RightSidebar/>
</main>
<Bottombar/>
</body>
</html>
</ClerkProvider>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With