Sullemanhossam
Sullemanhossam2mo ago

Detected a non-production build environment Vercel Build Error

Detected Next.js version: 14.2.3
Running "npx convex deploy --cmd 'npm run build'"
✖ 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
Exiting build container
Detected Next.js version: 14.2.3
Running "npx convex deploy --cmd 'npm run build'"
✖ 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
Exiting build container
No description
No description
2 Replies
Sullemanhossam
SullemanhossamOP2mo ago
I've set the correct key; this was a working deployment but has begun to throw this error.
ian
ian2mo ago
is it being used in a vercel preview deployment? vercel will try to use the same env variables when making preview deploys / dev deploys unless you specify that the env variable should only be used for prod

Did you find this page helpful?