dennyweber
TTCTheo's Typesafe Cult
•Created by dennyweber on 4/10/2023 in #questions
Deployment to Vercel fails
Hey all
i am going through this video: https://www.youtube.com/watch?v=YkOSUVzOAA4
I am failing right in the beginning. I have made the changes to the schema.prisma. Also i have added the environment variable to the Vercel project settings. If i execute "npm run dev" everything works fine locally. Also "npx prisma db push" and "npx prisma studio".
But when i deploy to Vercel i run into this error. Anyone has in idea what i am doing wrong?
[21:27:10.470] ❌ Invalid environment variables: {
[21:27:10.470] NEXTAUTH_SECRET: [ 'Required' ],
[21:27:10.471] DISCORD_CLIENT_ID: [ 'Required' ],
[21:27:10.471] DISCORD_CLIENT_SECRET: [ 'Required' ]
[21:27:10.471] }
[21:27:10.471] error - Failed to load next.config.mjs, see more info here https://nextjs.org/docs/messages/next-config-error
[21:27:10.476]
[21:27:10.476] > Build error occurred
[21:27:10.476] Error: Invalid environment variables
[21:27:10.476] at file:///vercel/path0/src/env.mjs:75:11
[21:27:10.476] at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
[21:27:10.499] Error: Command "npm run build" exited with 1
[21:27:10.823] BUILD_UTILS_SPAWN_1: Command "npm run build" exited with 1
6 replies