Using clerk sdk inside a mutation
I might be doing this wrong so if so I hope someone corrects me
I'm trying to create a clerk organization inside a mutation because I also create a document with additional fields I need to be linked to the organization. I attempt to do that using the clerkClient from @clerk/clerk-sdk-node but I get Node errors when importing 'dotenv/config' at the top of the file. What is the correct way to do that?
4 Replies
Betting it's because dotenv uses the filesystem and there's no filesystem to access in a convex function, node or otherwise. Can you share the error?
You'll want to skip dotenv and add your environment variables to your convex environment(s).
yes you're right about the filesystem, I'll try adding the env vars
it works, thank you 🙂

dang that's huge lol