From 518ac5d7c05cd1de15d8431e0c69b1326a9d92cb Mon Sep 17 00:00:00 2001 From: ABCrimson <231791317+ABCrimson@users.noreply.github.com> Date: Sat, 11 Jul 2026 11:51:28 -0500 Subject: [PATCH] fix(deploy): generate the Prisma client explicitly in the Vercel build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The client is generated by @nextcalc/database's postinstall into src/generated (the source tree, not node_modules). When a commit does not change the lockfile, Vercel restores its node_modules cache and pnpm skips lifecycle scripts entirely, so the freshly-cloned source tree has no generated client and the web build fails with "Module not found: ./generated/prisma/client". Deploys only ever succeeded when a lockfile change happened to force a full install (e.g. release version bumps). Run db:generate explicitly before the build — the exact pattern ci.yml already uses for the same reason. Co-Authored-By: Claude Fable 5 --- vercel.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vercel.json b/vercel.json index d04a16aa..1ac2d7ef 100644 --- a/vercel.json +++ b/vercel.json @@ -1,6 +1,6 @@ { "$schema": "https://openapi.vercel.sh/vercel.json", - "buildCommand": "cd ../.. && pnpm build --filter=@nextcalc/web", + "buildCommand": "cd ../.. && pnpm --filter @nextcalc/database db:generate && pnpm build --filter=@nextcalc/web", "installCommand": "cd ../.. && pnpm install", "framework": "nextjs", "outputDirectory": ".next"