Deployment to Production
What should i do t o switch from deployment to production? I already published my Next app on vercel but my production deployment wont work even tho i added and as a build command. Should i change my at another point or?
14 Replies
Sounds like you've followed this guide: https://docs.convex.dev/production/hosting/vercel#deploying-to-vercel
I am not sure what Vercel does with
.env
if it's checked in. I'd double check:
1. Double check if .env
is even checked in (ideally it isn't)
2. There isn't a different CONVEX_DEPLOY_KEY
in your .env
fileUsing Convex with Vercel | Convex Developer Hub
Host your frontend on Vercel and your backend on Convex.
this is my , i dont have anything about convex in .. First env variable and last one are same tho..
And i took that from Settings > Generate Key, @Indy isnt that what the docs say? but it assumes im working with react so idk never tried convex with pure react
maybe thats the issue
The
CONVEX_DEPLOY_KEY
should be set in the Vercel environment variables UI (step 4 in https://docs.convex.dev/production/hosting/vercel has an image). Does this error happen with the environment variable set there?Using Convex with Vercel | Convex Developer Hub
Host your frontend on Vercel and your backend on Convex.
Its set there aswell of course
Btw @sshader those 2 are the same and its link from the next picture
This was what I was referring to (different from the
.env
file)
Another thing to check -- what version of Convex are you running (from the package.json or from changing the command to npx convex --version
to see what it prints)I thought those 2 are the same.. sent wrong pic
And my version is 1.6.3
should i update to latest?
convex is on v1.7.1 now
Your package.json sounds unusual here, what's the entry for "build" there?