Vercel builds errorring out due to Invalid Vercel URL.

Hi! Stuck during first deployment of my T3 app. It keeps saying the VERCEL_URL is invalid but looking at the env variables the VERCEL_URL is set and is set to https://**.vercel.app VERCEL_URL: z.string().url().optional(), VERCEL_URL: process.env.VERCEL_URL,
3 Replies
Mocha
Mocha16mo ago
https://%2A%2A.vercel.app/ is not a valid URL (due to the *). You can remove .url() if you really want it to be that string.
Benjamin
Benjamin16mo ago
It doesn't fix your issue but if you want to use optional() with environment variables : Empty string ("") is not the same as undefined or null, you can use this schema:
VERCEL_URL: z.string().url().optional().or(z.literal("")),
VERCEL_URL: z.string().url().optional().or(z.literal("")),
DennisK
DennisK15mo ago
Thanks! Fixed it
Want results from more Discord servers?
Add your server