PrismaP
Prisma5mo ago
5 replies
Satont

With new `prisma-client` prisma client not included in package.json in final nx build.

When i migrated to the new prisma-client generator, my
prisma
dependency not included in final nx build of app.

My project done in way:
1. libs/database with schema and database logic, with prisma schema setted as:
generator client {
  provider        = "prisma-client"
  output          = "../../../../prisma-client-backend/src/generated"
  previewFeatures = ["metrics", "tracing"]
  engineType      = "client"
  runtime         = "nodejs"
  moduleFormat    = "cjs"

2. libs/prisma-client-backend with just outputed client.
3. in my root package.json i have all needed prisma deps:
"@prisma/adapter-mariadb": "6.16.1",
"@prisma/client": "6.16.1",
"@prisma/instrumentation": "6.16.1",
"prisma": "6.16.1",


But when i'm doing yarn nx build appname, then in ./dist/apps/appname package json contains only
"@prisma/adapter-mariadb": "6.16.1",
"@prisma/instrumentation": "6.16.1",
Was this page helpful?