Error when using NextJS 16.0.1 + Clerk Provider with cache components
Answered
tommmc. posted this in #help-forum
tommmc.OP
I just cloned the clerk/next-auth-starter-template and added cacheComponents in a next.config.ts file and hit errors during build and prerendering.
Any guidance or pointers would be appreciated.
Any guidance or pointers would be appreciated.
Answered by Morelet’s Crocodile
This pr : https://github.com/clerk/javascript/pull/7119 fixes that
3 Replies
Morelet’s Crocodile
This pr : https://github.com/clerk/javascript/pull/7119 fixes that
Answer
Morelet’s Crocodile
you'll also have to move your provider inside the html and body
<html>
<body>
<ClerkProvider>
{children}
</ClerkProvider>
</body>
</html>Once it is merged and shipped updating the package will fix it or you can use:
npm i https://pkg.pr.new/@clerk/nextjs@7119