Clerk/Convex setup issue
I have a NextJS app using both Convex + Clerk, and I'm now following the docs here to get Clerk/Convex to work together: https://docs.convex.dev/auth/clerk#nextjs
I've set NEXT_PUBLIC_CLERK_FRONTEND_API_URL in my .env.local file, but getting this error when I run
npx convex dev
:
It works if I set that env var in my Convex dev env, but seems odd to put a NEXT_PUBLIC var there? Wondering if the docs might be outdated?Convex & Clerk | Convex Developer Hub
Clerk is an authentication platform providing login via
2 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
Your .env.local is read by the cli to access your project, but it isn't read in by your Convex deployment. You'll need to set env vars for your deployment in the dashboard or via cli: