deployment failed with invalid enviroment variables when using t3env on vercel

the error message
> next build
❌ Invalid environment variables: {
NEXTAUTH_SECRET: [ 'Required' ],
DISCORD_CLIENT_ID: [ 'Required' ],
DISCORD_CLIENT_SECRET: [ 'Required' ],
GOOGLE_CLIENT_ID: [ 'Required' ],
GOOGLE_CLIENT_SECRET: [ 'Required' ],
POSTGRES_URL: [ 'Required' ],
POSTGRES_PRISMA_URL: [ 'Required' ],
POSTGRES_URL_NON_POOLING: [ 'Required' ],
POSTGRES_USER: [ 'Required' ],
POSTGRES_HOST: [ 'Required' ],
POSTGRES_PASSWORD: [ 'Required' ],
POSTGRES_DATABASE: [ 'Required' ]
}
⨯ Failed to load next.config.js, 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/src/env.js:4:20
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
Error: Command "npm run build" exited with 1
> next build
❌ Invalid environment variables: {
NEXTAUTH_SECRET: [ 'Required' ],
DISCORD_CLIENT_ID: [ 'Required' ],
DISCORD_CLIENT_SECRET: [ 'Required' ],
GOOGLE_CLIENT_ID: [ 'Required' ],
GOOGLE_CLIENT_SECRET: [ 'Required' ],
POSTGRES_URL: [ 'Required' ],
POSTGRES_PRISMA_URL: [ 'Required' ],
POSTGRES_URL_NON_POOLING: [ 'Required' ],
POSTGRES_USER: [ 'Required' ],
POSTGRES_HOST: [ 'Required' ],
POSTGRES_PASSWORD: [ 'Required' ],
POSTGRES_DATABASE: [ 'Required' ]
}
⨯ Failed to load next.config.js, 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/src/env.js:4:20
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
Error: Command "npm run build" exited with 1
env.js file https://github.com/Abdulkareemoj/Strmr/blob/main/src/env.js
GitHub
Strmr/src/env.js at main · Abdulkareemoj/Strmr
Contribute to Abdulkareemoj/Strmr development by creating an account on GitHub.
5 Replies
Neto
Neto10mo ago
you need to add the environment variables to vercel
Neto
Neto10mo ago
Environment Variables
Learn how to use Vercel Environment Variables, which are key-value pairs configured outside your source code that change depending on the environment.
WiZtEk
WiZtEkOP10mo ago
already did that😅
Neto
Neto10mo ago
still missing somewhere
WiZtEk
WiZtEkOP10mo ago
i cannot think of where that will be
Want results from more Discord servers?
Add your server