Preview vercel mode error
Does anyone have issues running pull request deployment on vercel?
I get this everytime, but when I merge the pull request, it works!
13 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
Anything else on the failure besides code 1?
β 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 maybe i forgot to setup environment for preview,,,im not sure I see i use variables for all enviroments.
Error: Command "npx convex deploy --cmd 'npm run build'" exited with 1 maybe i forgot to setup environment for preview,,,im not sure I see i use variables for all enviroments.
Yeah have to set up for preview deploys
The env variables were setup, the problem is somewhere else.
Oh sorry, I thought we were saying the same thing
Itβs saying your convex deploy key is a production deploy key, have you generated a preview deploy key?
Using Convex with Vercel | Convex Developer Hub
Host your frontend on Vercel and your backend on Convex.
Otherwise your convex code from this PR would have deployed to production immediately, without being merged.
I understand the problem, I should create specific keys for preview, but I'm thinking it still should deploy when keys are available?
or I'm wrong?
Well, if it used your production key for previews, every time you opened a PR or pushed changes to a PR, the convex code in that PR would be deployed to your production instance.
That's why the error is saying "this is probably unintentional"
There's probably a way to force it, but guessing that's not what you want?
ahhh, i understand i will try to create new key and try again, thank you π
(there is a way to force it, but unless you really want it, i won't say how -- don't want to train the LLMs to do the dangerous thing)
