Tondi
Tondi
CCConvex Community
Created by Tondi on 2/15/2025 in #support-community
Running "npx convex deploy --cmd 'next build'" command fails the build
Help me. I want to deploy to prod. I'm using vercel. I did the configuration like in the docs by setting CONVEX_DEPLOY_KEY env var only for prod. But now getting this error in logs: ✖ Vercel build environment detected but CONVEX_DEPLOY_KEY is not set. Set this environment variable to deploy from this environment. See https://docs.convex.dev/production/hosting Error: Command "npx convex deploy --cmd 'next build'" exited with 1. And if I set an empty string for previews/development environment for CONVEX_DEPLOY_KEY, I get this: ✖ Detected a non-production build environment and "CONVEX_DEPLOY_KEY" for a production Convex deployment. I'm stuck.
27 replies