Clerk Integration with next 13.1.6 Missing publishableKey. #3131
Replies: 1 comment
-
https://github.com/orgs/clerk/discussions/3829 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to address some serious issues we are encountering in the production deployment of our solution based on Next.js, version "13.1.6". When attempting to access the page "/Admin", we encounter the following error:
Error occurred prerendering page "/Admin". Read more: https://nextjs.org/docs/messages/prerender-error
Error: @clerk/nextjs: Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.
Error occurred prerendering page "/marketplace". Read more: https://nextjs.org/docs/messages/prerender-error
Error: @clerk/nextjs: Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.
_app.js
<ClerkProvider {...pageProps} publishableKey={process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY}> <Component {...pageProps} />
It's important to note that the Clerk publishable key is fetched from the environment variables. Specifically, it should be available as NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY.
The project structure :
We are deploying on vercel
Upon further analysis, we have identified that the error lies in the absence of a publishableKey required by Clerk for the proper functioning of our application. This key is essential for authenticating and authorizing requests with Clerk.
Beta Was this translation helpful? Give feedback.
All reactions