Running into Error: @clerk/nextjs: Missing publishableKey. when following the The Modern React Tutor

Anyone else run into this error when deploying to Vercel? - Clerk is working fine on localhost - NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY added to vercel Environment Variables First time using Clerk so I'm not sure if it's my code or something mis-configured in the Clerk admin https://github.com/ruridge/t3gallery
GitHub
GitHub - ruridge/t3gallery
Contribute to ruridge/t3gallery development by creating an account on GitHub.
Solution:
Looks like it's a Vercel incident: [Vercel status] Investigating: New environment variable not appearing in production deployments https://stspg.io/2jnk8gcxtllr...
Jump to solution
10 Replies
Sturlen
Sturlenβ€’2mo ago
you might need to pass it yourself to the ClerkProvider component:
...
<ClerkProvider publishableKey={process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY}>
<body>{children}</body>
</ClerkProvider>
...
<ClerkProvider publishableKey={process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY}>
<body>{children}</body>
</ClerkProvider>
this is assuming it's inside a client component
rob
robβ€’2mo ago
I'm using a server component, same as Theo did in the tutorial
rob
robβ€’2mo ago
Looking into this there is a lot of confusion around the need or not of defining the publishableKey prop
No description
Sturlen
Sturlenβ€’2mo ago
oops, I meant to write server component. this would only work for a server component, not a client component
rob
robβ€’2mo ago
I'll try it out, I'll πŸ€¦β€β™‚οΈ if it's this because I found this prop but noticed Theo wasn't using it lol nah, same issue.
Sturlen
Sturlenβ€’2mo ago
is the key set to be available in production e.g.
No description
rob
robβ€’2mo ago
yep πŸ‘
No description
Sturlen
Sturlenβ€’2mo ago
I'm out of ideas then. you might want to ask this in Clerk's own Discord server if you haven't already
rob
robβ€’2mo ago
Thanks for trying, appreciate it πŸ™
Solution
rob
robβ€’2mo ago
Looks like it's a Vercel incident: [Vercel status] Investigating: New environment variable not appearing in production deployments https://stspg.io/2jnk8gcxtllr
Want results from more Discord servers?
Add your server
More Posts