From 795190822943fadf8d98ef72cbb81e270a2e16fe Mon Sep 17 00:00:00 2001 From: julien Date: Mon, 4 May 2026 15:33:40 +0200 Subject: [PATCH] chore(prisma): point root postinstall to BFF schema (#9) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary `@prisma/client`'s postinstall hook runs `prisma generate` from the workspace root and didn't find a schema there, so the typed client was never generated. Fine today (schema has no models, no runtime usage), but a trap as soon as the first model lands. Declare `package.json#prisma.schema` so the postinstall locates `apps/portal-bff/prisma/schema.prisma` and generates the typed client on every `pnpm install`. Verified locally: postinstall now logs `✔ Generated Prisma Client (v6.19.3)`. ## Notes - Prisma 6.19 emits a deprecation warning suggesting migration to `prisma.config.ts`. That format is freshly out of Early Access and the migration is small but non-trivial — folding it into the future Prisma 7 upgrade (which itself depends on `nestjs-prisma` catching up and will get its own ADR). ## Test plan - [ ] CI green on this PR. - [ ] In the `Run pnpm install --frozen-lockfile` log of the `check` job, the warning `prisma:warn We could not find your Prisma schema` is gone, replaced with `✔ Generated Prisma Client`. --------- Co-authored-by: Julien Gautier Reviewed-on: https://git.unespace.com/julien/apf_portal/pulls/9 --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index 3be8b8f..cd0cecc 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,9 @@ "unrs-resolver" ] }, + "prisma": { + "schema": "apps/portal-bff/prisma/schema.prisma" + }, "devDependencies": { "@analogjs/vite-plugin-angular": "~2.1.2", "@analogjs/vitest-angular": "~2.1.2",