From 383e565b93e63ec443d2d28f87c2e9cfa46a31eb Mon Sep 17 00:00:00 2001 From: Julien Gautier Date: Mon, 4 May 2026 15:27:37 +0200 Subject: [PATCH] chore(prisma): point root postinstall to BFF schema MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `@prisma/client`'s postinstall hook runs `prisma generate` from the workspace root, where it doesn't find a schema in the default locations and warns. The hook then exits without generating the typed client — fine today (the schema has no models yet, no code calls into the client at runtime), but a trap waiting for the first real model to be added. Declare `package.json#prisma.schema` so the postinstall hook locates the schema at apps/portal-bff/prisma/schema.prisma and generates the typed client unconditionally on every `pnpm install`. Note: Prisma 6.19 emits a deprecation warning ("migrate to prisma.config.ts"). Migrating that format will be folded into the future Prisma 7 upgrade (which itself depends on nestjs-prisma catching up to Prisma 7 and will get its own ADR). --- 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", -- 2.30.2