Vercel server environment variables not pulling in

I am currently using using T3 Env for type safe environment variables however on vercel it seems that the server environment variables aren't pulling in for some reason. it builds fine in locally and builds fine using the Vercel CLI using vercel pull and vercel build. I have checked that my environment variables are correct in my settings and they are and are set for the right environments. This is the error I see:
$ next build
Invalid environment variables: {
SUPABASE_URI: [ 'Required' ],
UNSPLASH_SECRET: [ 'Required' ],
UPLOADTHING_SECRET: [ 'Required' ],
UPLOADTHING_APP_ID: [ 'Required' ],
SUPABASE_SERVICE_ROLE: [ 'Required' ],
GOOGLE_AI_API_KEY: [ 'Required' ],
UPSTASH_REDIS_REST_URL: [ 'Required' ],
UPSTASH_REDIS_REST_TOKEN: [ 'Required' ]
}
Failed to load next.config.mjs, see more info here https://nextjs.org/docs/messages/next-config-error

> Build error occurred
Error: Invalid environment variables
at onValidationError (file:///vercel/path0/node_modules/@t3-oss/env-core/dist/index.js:29:15)
at createEnv (file:///vercel/path0/node_modules/@t3-oss/env-core/dist/index.js:35:16)
at createEnv (file:///vercel/path0/node_modules/@t3-oss/env-nextjs/dist/index.js:12:12)
at file:///vercel/path0/apps/website/env.mjs:4:20
at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
at async loadConfig (/vercel/path0/node_modules/next/dist/server/config.js:698:36)
$ next build
Invalid environment variables: {
SUPABASE_URI: [ 'Required' ],
UNSPLASH_SECRET: [ 'Required' ],
UPLOADTHING_SECRET: [ 'Required' ],
UPLOADTHING_APP_ID: [ 'Required' ],
SUPABASE_SERVICE_ROLE: [ 'Required' ],
GOOGLE_AI_API_KEY: [ 'Required' ],
UPSTASH_REDIS_REST_URL: [ 'Required' ],
UPSTASH_REDIS_REST_TOKEN: [ 'Required' ]
}
Failed to load next.config.mjs, see more info here https://nextjs.org/docs/messages/next-config-error

> Build error occurred
Error: Invalid environment variables
at onValidationError (file:///vercel/path0/node_modules/@t3-oss/env-core/dist/index.js:29:15)
at createEnv (file:///vercel/path0/node_modules/@t3-oss/env-core/dist/index.js:35:16)
at createEnv (file:///vercel/path0/node_modules/@t3-oss/env-nextjs/dist/index.js:12:12)
at file:///vercel/path0/apps/website/env.mjs:4:20
at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
at async loadConfig (/vercel/path0/node_modules/next/dist/server/config.js:698:36)
the repo can be found here: https://github.com/jacobsamo/Mixie/tree/HOT-FIX-typescript-env-errors also logged on vercel discussions: https://github.com/orgs/vercel/discussions/7311
Env
Never build your apps with invalid environment variables again. Validate and transform your environment with the full power of Zod.
GitHub
GitHub - jacobsamo/Mixie at HOT-FIX-typescript-env-errors
Mixie is an open source, community-driven recipe platform where home cooks and food enthusiasts can cook, create and collaborate on unique and delicious recipes. - GitHub - jacobsamo/Mixie at HOT-F...
GitHub
Vercel Server environment variables not pulling into project · verc...
Page to Investigate https://github.com/t3-oss/t3-env Steps to Reproduce I am currently using using T3 Env for type safe environment variables however on vercel it seems that the server environment ...
0 Replies
No replies yetBe the first to reply to this messageJoin