Why Prisma ORM Generates Code into Node Modules & Why It’ll Change

This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).

Prisma ORM has historically generated its database client code into node_modules for a unified developer experience, but this approach caused friction with tools that assume node_modules is only modified by package managers. Workarounds like rebooting the TS language server and a dedicated Next.js monorepo plugin were needed. In v7, Prisma will require an explicit output path via the new prisma-client generator, treating generated code as regular application code. A deprecation warning added in v6.6.0 caused community confusion and has since been removed. Existing projects using prisma-client-js can continue as-is until v7, while new projects are encouraged to set a custom output path like src/generated/prisma.

7m read timeFrom prisma.io
Post cover image
Table of contents
Why and how are we changing the location of Prisma Client in v7Confusions with setting an output path since v6.6.0When to use a custom output path with Prisma ORM today
2 Impressions