Issue with deployment
Detected a non-production build environment and "CONVEX_DEPLOY_KEY" for a production Convex deployment.
This is probably unintentional.
Error: Command "npx convex deploy --cmd 'npm run build'" exited with 1
Error: Command "npx convex deploy --cmd 'npm run build'" exited with 1
3 Replies
Where are you running this?
I guess it's when deploying a preview on Vercel or Netlify, but you didn't configure CONVEX_DEPLOY_KEY for preview deployments.
You can skip the check with
npx convex deploy --check-build-environment=disable
Got it check worked
Thankyou
To be extra clear, if you're doing
npx convex deploy --check-build-environment=disable
from a Vercel preview deployment, this means you're pushing to your Convex production deployment on every PR (assuming you have Vercel preview deployments set up on every PR). This usually isn't what you want since it can break your production app with changes that haven't been merged in yet, but if this is really the behavior you want, skipping the check is the way to go.