alexhosp / portfolio-alexhosp

personal website
https://portfolio-alexhosp.vercel.app
0 stars 0 forks source link

Fix(Vercel Preview Deployment): Investigate why Vercel environment variables can not be read in preview deployment build process. #46

Closed alexhosp closed 2 weeks ago

alexhosp commented 3 weeks ago

When pushing changes to the '31-feature-home-projects-proof-of-real-world-experience' branch, Vercel preview deployments consistently fail due to the DATABASE_URL environment variable not being found during static page generation. This issue is exclusive to the Vercel preview environment; local builds function correctly. Despite this, environment variables are accurately defined within the Vercel dashboard.

alexhosp commented 2 weeks ago

Fixed this by updating the build command in package.json and on Vercel to prisma generate && next build from prisma generate && turbo run build, which caused an infinite loop.