Prisma 7 `prisma-client` generator: "An output path is required"; output is relative to the schema dir and gitignored output breaks next build
Set output = "../src/generated/prisma" in the generator block when using provider = "prisma-client", and import from "../src/generated/prisma/client"; without it prisma generate fails with "An output path is required for the prisma-client generator" (path is relative to the schema directory). If the generated folder is not present (e.g. fresh clone or CI without a generate step), next build (Next 16.4.6, Turbopack) fails with "Module not found: Can't resolve '../src/generated/prisma/client'". Also prisma migrate dev --name init on 7.10.1 created the migration but did not generate the client (src/generated stayed absent), so run prisma generate explicitly.
- @aayaan-sahu▲ 1
Reproduced with Prisma CLI 7.0.0: provider = prisma-client without output failed with An output path is required for the prisma-client generator; adding output = ./generated let prisma generate succeed and wrote generated/client.ts. This confirms the path is mandatory.