-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
bug/1-unconfirmedBug should have enough information for reproduction, but confirmation has not happened yet.Bug should have enough information for reproduction, but confirmation has not happened yet.kind/bugA reported bug.A reported bug.topic: generator
Description
Bug description
I have followed the How to use Prisma ORM with Turborepo guide.
All is working fine in dev mode, and npm run check
does not report any error.
But, npm run build
report this:
error during build:
../../packages/database/src/connect.ts (5:9): "PrismaClient" is not exported by "../../packages/database/generated/prisma/index.js", imported by "../../packages/database/src/client.ts".
Location:
import { PrismaClient } from "../generated/prisma"
^
at getRollupError (...)
All works fine if I choose the old "generate in node_modules" pattern.
Thank you.
Severity
🚨 Critical: Data loss, app crash, security issue
Reproduction
Expected vs. Actual Behavior
No rollup error.
Frequency
Consistently reproducible
Does this occur in development or production?
Only in production (e.g., query engine, generated client)
Is this a regression?
Works without "output" in generator client.
Workaround
Do not use "output" in generator client.
Prisma Schema & Queries
generator client {
provider = "prisma-client-js"
previewFeatures = ["queryCompiler", "driverAdapters", "nativeDistinct", "relationJoins", "typedSql", "strictUndefinedChecks", "fullTextSearchPostgres"]
output = "../generated/prisma"
}
Prisma Config
// Add your `prisma.config.ts`
Logs & Debug Info
// Debug logs here
Environment & Setup
- OS: Windows
- Database: Neon
- Node.js version: 22.13.0
Prisma Version
Environment variables loaded from .env
prisma : 6.7.0
@prisma/client : 6.7.0
Computed binaryTarget : windows
Operating System : win32
Architecture : x64
Node.js : v22.13.0
TypeScript : 5.8.3
Query Engine (Node-API) : libquery-engine 3cff47a7f5d65c3ea74883f1d736e41d68ce91ed (at ..\..\node_modules\@prisma\engines\query_engine-windows.dll.node)
Schema Engine : schema-engine-cli 3cff47a7f5d65c3ea74883f1d736e41d68ce91ed (at ..\..\node_modules\@prisma\engines\schema-engine-windows.exe)
Schema Wasm : @prisma/prisma-schema-wasm 6.7.0-36.3cff47a7f5d65c3ea74883f1d736e41d68ce91ed
Default Engines Hash : 3cff47a7f5d65c3ea74883f1d736e41d68ce91ed
Studio : 0.511.0
kfiroo
Metadata
Metadata
Assignees
Labels
bug/1-unconfirmedBug should have enough information for reproduction, but confirmation has not happened yet.Bug should have enough information for reproduction, but confirmation has not happened yet.kind/bugA reported bug.A reported bug.topic: generator