Next.js Discord

Discord Forum

Question About Preview Deployments

Answered
DylanDev posted this in #help-forum
Open in Discord
Avatar
I'm so sorry that this is a vercel question but it involves a Next.js project so I thought I asked.

My pull request always shows a failed build whenever I submit a pull request with little to no information.

However, when I merge into main, it works. is there a way to disable this message on pull requests? We don't use previews or anything complicated just the deployments.
Image
Image
Answered by DylanDev
the issue is convex charges money for preview instances which I don't have that plan
View full answer

18 Replies

Avatar
This is about a next js project!
@Asian black bear I don't know if this is an issue with vercel or the way i have my next.js project setup
Avatar
Asian black bear
Your build logs clearly show that your convex deploy command is failing. If you read the logs you will figure out why, probably missing environment variables.
This likely has nothing to do with Next.js
Avatar
Its only showing me those two red lines at the bottom no other details. Is it because of preview? Is there anyway to just disable preview for my project?
Image
cause when it actually deploys it does not fail
deploys to production* rather than preview
Avatar
Asian black bear
You'll have to figure out why the Convex CLI fails and troubleshoot that.
Avatar
ah i see. since it only fails on previews, is there a way to just disable that for my next project?
Avatar
Asian black bear
Btw that warning before the error is probably the reason why it fails for safety reasons
Your preview deployment on Vercel trying to deploy to your production Convex deployment.
Chances are you can just fix it by replacing the deploy key with one to a staging environment.
Avatar
Oh i see!
Avatar
the issue is convex charges money for preview instances which I don't have that plan
Answer
Avatar
thats why i ask about disabiling previews
let me know if you know about that. if you dont no worries. Just let me know!
Avatar
Asian black bear
Yes, you can disable preview depoyments on Vercel by reading their docs about ignored build steps. In any case, this is no longer on topic for the forum.
Avatar
Thank you @Asian black bear. I appreciate your help!