Issues with Vercel deployment
I am encountering something strange on Vercel. I am following this guide: https://docs.convex.dev/production/hosting/vercel
I am very certain I have all the environment variables needed, but I am encountering some issues.
When I include the CONVEX_DEPLOY_TOKEN, I get `
When I do not include the CONVEX_DEPLOY_TOKEN, I get:
I have attached some screenshots of my Vercel configuration.
22 Replies
Strangely enough, I followed the same guide for another project previously and it worked as expected, I am not sure what could be the issue.
Hey @milk enjoyer , are you sure you have copied the deploy key correctly from the dashboard? Can you try to replace it?
yes, I just double-checked. I even created a new one and replaced it everywhere. I am using the dev key for preview environments by the way.
Ah, can you try upgrading convex to 1.10.0-alpha.0 (https://www.npmjs.com/package/convex/v/1.10.0-alpha.0 )? It should include a fix.
npm
convex
Client for the Convex Cloud. Latest version: 1.9.0, last published: 6 days ago. Start using convex in your project by running
npm i convex
. There is 1 other project in the npm registry using convex.I get a new error now with this upgraded package:
I have double and triple-checked the CONVEX_DEPLOY_KEY too
Do you have CONVEX_DEPLOYMENT set as well?
Yeah, I see it in your list, can you remove it from production and preview?
ok it works now after deleting it
CONVEX_DEPLOYMENT was automatically set during convex init by the way
so it might be confusing for users who simply copy and paste their .env over to vercel
Yeah, the presence of CONVEX_DEPLOYMENT should not matter, we'll fix these bugs in 1.9.1 and 1.10 coming soon.
All of a sudden I am getting this error
I tried adding CONVEX_DEPLOYMENT, but that brings back the previous error @Michal Srb
@milk enjoyer are you definitely on the alpha version? 1.10.0-alpha.0
Yes, I am definitely on 1.10.0-alpha.0. I solved the token invalid problem from before after i swapped to 1.10.0-alpha.0
Hmm, the error would suggest that you don't CONVEX_DEPLOY_KEY set (which I assume you do)
I do. But I removed CONVEX_DEPLOYMENT based on your recommendation which solved the previous build errors for me.
by the way this exact same configuration has been working for me between Feb 15-16, only on Feb 17 this new error started happening out of nowhere (I did not change any packages or ENV variables between feb 15 to feb 17)
Hey @milk enjoyer we published convex@1.9.1 which should hopefully resolve the deployment issues. Try it out and let me know how it goes.
Ok, let me try it out now, thanks!
I just upgraded, and it completely broke my codebase due to some supposed changes in the types
QueryCtx is just one example, I have 56 other things where the types are failing now after the upgrade
I can confirm that downgrading back to 1.9.0 instantly solved all these type errors
@milk enjoyer what is your project setup?
convex-helpers
has convex
as a peer dependency, so after you install latest convex convex-helpers
should be using it. Are you on the latest version of convex-helpers
? Maybe try deleting your node_modules
and reinstalling.Hmm indeed it seems like it was due to multiple different versions in my node_modeules. It works now thanks!