That's what I did in package.json file (It was a deploy a Next app on Versel) I just added generate command to the build script:
"scripts": {
"dev": "next dev",
"build": "prisma generate && next build",
"start": "next start",
"lint": "next lint"
},
Not sure if it is a correct way, though..
Answer from maxuapro on Stack OverflowPrisma
prisma.io › home › introduction to prisma client › introduction to prisma client › introduction to prisma client › introduction to prisma client
Introduction to Prisma Client | Prisma Documentation
npm · bunx prisma generate · This will create a generated directory based on where you set the output to in the Prisma Schema. Any time your import Prisma Client, it will need to come from this generated client API.
Top answer 1 of 5
4
That's what I did in package.json file (It was a deploy a Next app on Versel) I just added generate command to the build script:
"scripts": {
"dev": "next dev",
"build": "prisma generate && next build",
"start": "next start",
"lint": "next lint"
},
Not sure if it is a correct way, though..
2 of 5
2
There's no need to run the prisma generate command that is executed on installation of the @prisma/client.
EDIT: https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/generating-prisma-client
npm
npmjs.com › package › prisma
prisma - npm
2 days ago - npm · Sign UpSign In · 7.9.0 • Public • Published 16 hours ago · Readme · Code Beta · 6 Dependencies · 1030 Dependents · 9,205 Versions · Quickstart • Website • Docs • Examples • Blog • Discord • Twitter · Prisma is a next-generation ORM that consists of these tools: Prisma Client: Auto-generated and type-safe query builder for Node.js & TypeScript ·
» npm install prisma
Published Jul 20, 2026
Version 7.9.0
Prisma
prisma.io › home › generating prisma client › generating prisma client › generating prisma client › generating prisma client
Generating Prisma Client | Prisma Documentation
generator client { provider = "prisma-client" output = "./generated" } Run the following command whenever you add models, change fields, or update generator settings: bun · pnpm · yarn · npm · bunx prisma generate · If you want the CLI-specific options such as --watch or --generator, see the prisma generate command reference.
npm
npmjs.com › package › prisma-erd-generator
prisma-erd-generator - npm
May 30, 2026 - npm tokens that bypass 2FA are being restricted — account changes (Aug 2026) and direct publishing (Jan 2027). Learn how to prepare →× ... Prisma generator to create an ER Diagram every time you generate your prisma client.
» npm install prisma-erd-generator
Published Jul 13, 2026
Version 2.4.4
npm
npmjs.com › package › prisma-class-generator
prisma-class-generator - npm
August 12, 2024 - Latest version: 0.2.11, last published: 2 years ago. Start using prisma-class-generator in your project by running `npm i prisma-class-generator`. There are 5 other projects in the npm registry using prisma-class-generator.
» npm install prisma-class-generator
Published Aug 12, 2024
Version 0.2.11
npm
npmjs.com › package › prisma-docs-generator
prisma-docs-generator - npm
May 17, 2023 - Latest version: 0.8.0, last published: 3 years ago. Start using prisma-docs-generator in your project by running `npm i prisma-docs-generator`. There are 1 other projects in the npm registry using prisma-docs-generator.
» npm install prisma-docs-generator
Published May 17, 2023
Version 0.8.0
npm
npmjs.com › package › prisma-zod-generator
prisma-zod-generator - npm
# Install npm install -D prisma-zod-generator # Add to schema.prisma generator zod { provider = "prisma-zod-generator" } # Generate npx prisma generate
» npm install prisma-zod-generator
Published Feb 14, 2026
Version 2.1.4
GitHub
github.com › prisma › prisma
GitHub - prisma/prisma: Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB · GitHub
Once the data model is defined, you can generate Prisma Client which will expose CRUD and more queries for the defined models. If you're using TypeScript, you'll get full type-safety for all queries (even when only retrieving the subsets of ...
Starred by 47.4K users
Forked by 2.4K users
Languages TypeScript 99.0% | JavaScript 0.9% | Shell 0.1% | Dockerfile 0.0% | PLpgSQL 0.0% | Batchfile 0.0%
npm
npmjs.com › package › @mainamiru › prisma-types-generator
@mainamiru/prisma-types-generator - npm
March 29, 2025 - Start using @mainamiru/prisma-types-generator in your project by running `npm i @mainamiru/prisma-types-generator`. There are no other projects in the npm registry using @mainamiru/prisma-types-generator.
» npm install @mainamiru/prisma-types-generator
Published Mar 29, 2025
Version 1.1.14
npm
npmjs.com › package › prisma-dbml-generator
prisma-dbml-generator - npm
February 15, 2024 - Prisma DBML Generator. Latest version: 0.12.0, last published: 2 years ago. Start using prisma-dbml-generator in your project by running `npm i prisma-dbml-generator`. There are 6 other projects in the npm registry using prisma-dbml-generator.
» npm install prisma-dbml-generator
Published Feb 15, 2024
Version 0.12.0
npm
npmjs.com › package › @prisma › client
@prisma/client - npm
Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.. Latest version: 7.9.0, last published: 14 hours ago. Start using @prisma/client in your project by running `npm ...
» npm install @prisma/client
Published Jul 20, 2026
Version 7.9.0
GitHub
github.com › YassinEldeeb › create-prisma-generator
GitHub - YassinEldeeb/create-prisma-generator: Get started developing your own ◭ Prisma generator by running a single command.
Workspace setup for testing the generator locally using prisma generate. Scripts for development, building, packaging and testing. Support for most package-managers yarn, pnpm and npm.
Starred by 195 users
Forked by 8 users
Languages TypeScript 84.3% | JavaScript 15.2% | Shell 0.5% | TypeScript 84.3% | JavaScript 15.2% | Shell 0.5%