chore(prisma): point root postinstall to BFF schema
CI / check (pull_request) Has been cancelled
CI / perf (pull_request) Has been cancelled
CI / a11y (pull_request) Has been cancelled
CI / commits (pull_request) Has been cancelled
CI / scan (pull_request) Has been cancelled

`@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).
This commit is contained in:
Julien Gautier
2026-05-04 15:27:37 +02:00
parent b7adf2e308
commit 383e565b93
+3
View File
@@ -32,6 +32,9 @@
"unrs-resolver" "unrs-resolver"
] ]
}, },
"prisma": {
"schema": "apps/portal-bff/prisma/schema.prisma"
},
"devDependencies": { "devDependencies": {
"@analogjs/vite-plugin-angular": "~2.1.2", "@analogjs/vite-plugin-angular": "~2.1.2",
"@analogjs/vitest-angular": "~2.1.2", "@analogjs/vitest-angular": "~2.1.2",