From b2617e1839d2be734f1b3947ce314e0c129a0e56 Mon Sep 17 00:00:00 2001 From: oratis Date: Sat, 8 Aug 2026 17:19:02 +0800 Subject: [PATCH] chore: generate the Prisma client on postinstall MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `src/generated/prisma` is gitignored and there was no postinstall hook, so a fresh clone, a CI job, or any `npm install` left the client missing — and `tsc --noEmit` reported 69 errors that had nothing to do with the code (`Property 'competitorCreative' does not exist on type 'PrismaClient'` and similar, 40 of them). A typecheck that is always red is a typecheck nobody reads, which is how a real error would get through. Adding `"postinstall": "prisma generate"` — the standard Prisma convention for a gitignored client. Verified end to end: delete src/generated/prisma → 173 errors; `npm install` → client regenerated → 0 errors, 414 tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index d379eb8..4c10f98 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "private": true, "scripts": { "dev": "next dev", + "postinstall": "prisma generate", "build": "next build", "start": "next start", "lint": "eslint",