Thank you for your quick reply. If I
Thank you for your quick reply. If I enter the command in the local environment and deploy manually, it works. I have also removed *.vercel.app domain from vercel under domains. If you go to the deployment link, then 404: NOT_FOUND is shown. It is deployed like a kind of website, but is not accessible. Is this all correct?
4 Replies
It sounds like the build command on vercel didn't run correctly. Look closely at the command, and make sure it lines up with your directory names, etc. It's a bit confusing, but you are cding out of your next folder in to convex, then running the convex deploy command which will jump back into your next folder.
OR - maybe your domain name isn't set up correctly. This could also cause a 404. Not being able to use *.vercel.app is an issue specific to using Clerk. If you were able to create your frontend successfully before, could you access it from your domain name?
Bro my mistake. I got it wrong. I need to create a vercel.json file in my next.js project. In my case, I insert the following command into it
(“cd ../../packages/backend && bunx convex deploy --cmd ‘cd ../../apps/web && bun run build’ --cmd-url-env-var-name NEXT_PUBLIC_CONVEX_URL”).
I deployed my convex folder to nextjs like a fool 😄
It took me a long time to figure it out myself. Vercel don't give you great feedback for what might be wrong
But you deserve an achievement for being the first person to successfully deploy the convex backend directly to vercel, well done 🏅
There is a vercel.json file in the project you sent me earlier. I read in the next.js docs that vercel.json is used to configure and override the default behavior of vercel in a project. Only then did it “click” in my head and I understood what you meant. Jesus... you always learn. Thank you anyway for your quick reply and for the achievement 😂