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
Theo - t3․gg
YouTube
T3 Stack Tutorial - FROM 0 TO PROD FOR $0 (Next.js, tRPC, TypeScrip...
I've never worked this hard on a video before. I really hope y'all can benefit from this 🙏 GITHUB REPO https://github.com/t3dotgg/chirp DEPLOYED APP https://xn--uo8h.t3.gg/ GET A JACKET IF YOU'RE COOL LIKE THAT https://shop.t3.gg/ ALL MY VIDEOS ARE POSTED EARLY ON PATREON https://www.patreon.com/t3dotgg Everything else (Twitch, Twitter, Discor...
4 Replies
James Perkins
James Perkins2y ago
You need to remove the env requirements in the t3 app.
James Perkins
James Perkins2y ago
Create T3 App
Environment Variables 🚀 Create T3 App
The best way to start a full-stack, typesafe Next.js app.
James Perkins
James Perkins2y ago
You don't need them because it uses Clerk so those are envs you don't need. Otherwise you can add SKIP_ENV_VALIDATION and set it to true.
dennyweber
dennyweberOP2y ago
That worked perfectly fine. Thanks a lot!
Want results from more Discord servers?
Add your server