env-nextjs error
Hey y'all. Working a new project using t3-oss/env-nextjs and I'm getting this error when trying to start up the app. Anyone seen this b4?
❌ Invalid environment variables: {
NODE_ENV: [ "Expected 'development' | 'production', received object" ],
DATABASE_URL: [ 'Expected string, received object' ],
NEXTAUTH_URL: [ 'Expected string, received object' ],
NEXTAUTH_SECRET: [ 'Expected string, received object' ],
GITHUB_ACCESS_TOKEN: [ 'Expected string, received object' ],
SMTP_FROM: [ 'Expected string, received object' ],
SMTP_HOST: [ 'Expected string, received object' ],
SMTP_PORT: [ 'Expected number, received object' ],
POSTMARK_API_TOKEN: [ 'Expected string, received object' ],
STRIPE_SECRET_API_TOKEN: [ 'Expected string, received object' ],
STRIPE_PUBLIC_API_TOKEN: [ 'Expected string, received object' ],
STRIPE_WEBHOOK_API_TOKEN: [ 'Expected string, received object' ],
DISCORD_NOTIFICATION_WEBHOOK: [ 'Expected string, received object' ],
NEXT_PUBLIC_APP_URL: [ 'Required' ]
}
3 Replies
show some codse
Do you have your env variables setup? Looks like zods trying to parse to give the app typed env vars
How do you parse your vars in the runtime Env