cdotmeng
cdotmeng
CCConvex Community
Created by cdotmeng on 11/14/2024 in #support-community
Unable to Vercel Deploy to Prod with Vite React and Convex Auth
Hi Convex support team! I’ve been building a project with Convex and Vite with Convex Auth (Resend) that is working great locally, but I have been running into issues in trying to deploy to Prod with Vercel. Can someone please help me understand: 1. What are the Vercel environment variables that are needed? Is it just the Convex Prod Deployment Key? Or do I also need to specify the Convex URL eg -donkey-88…? 2. What are the Convex Prod environment variables needed? I currently have the Resend API Key there. Is that correct? Anything else needed eg for my OpenAI calls in my app? 3. How should my auth.ts file be written, in the codebase? Should it be pointing at a Convex Env variable? Or a .env that is exposed with eg VITE_SITE_URL? 4. How should my ConvexReactClient be written, in the codebase? Should that be hardcoded to the Prod URL of my Prod Convex deployment?
Thank you!
9 replies