Skip to content

chore: generate the Prisma client on postinstall - #22

Merged
oratis merged 1 commit into
mainfrom
chore/prisma-postinstall
Aug 8, 2026
Merged

chore: generate the Prisma client on postinstall#22
oratis merged 1 commit into
mainfrom
chore/prisma-postinstall

Conversation

@oratis

@oratis oratis commented Aug 8, 2026

Copy link
Copy Markdown
Owner

tsc --noEmit on main reports 69 errors, none of them real:

Property 'competitorCreative' does not exist on type 'PrismaClient'
Module '"@/generated/prisma/client"' has no exported member 'CompetitorCreative'

Cause: src/generated/prisma is gitignored and there is no postinstall hook — so a fresh clone, a CI job, or any npm install leaves the client missing and the schema-derived types unresolvable.

A typecheck that is always red is a typecheck nobody reads — which is exactly how a real error gets through. I hit this while reviewing #21 and had to diff the error sets against main to prove that PR introduced none of them.

Fix is the standard Prisma convention: "postinstall": "prisma generate".

Verified end to end

step errors
delete src/generated/prisma 173
npm install (postinstall fires) 0

npm test → 414 passed / 32 files.

🤖 Generated with Claude Code

`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) <noreply@anthropic.com>
@oratis
oratis merged commit 3f3b947 into main Aug 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant