Generating Prisma Client

I am trying to better understand how to correctly import the client from https://www.prisma.io/docs/orm/prisma-client/setup-and-configuration/generating-prisma-client I have used the new configuration:
generator client {
provider = "prisma-client-js"
output = "app/generated/prisma/client"
}
generator client {
provider = "prisma-client-js"
output = "app/generated/prisma/client"
}
and see that to use the client I should import as follows:
import { PrismaClient } from 'app/generated/prisma/client'
const prisma = new PrismaClient()
import { PrismaClient } from 'app/generated/prisma/client'
const prisma = new PrismaClient()
Below this I then see a section about @prisma/client? Should this be ignored if using the new way? Thanks!
Generating Prisma Client | Prisma Documentation
This page explains how to generate Prisma Client. It also provides additional context on the generated client, typical workflows and Node.js configuration.
2 Replies
Prisma AI Help
You selected the carefully hand-crafted route. A dev artisan will respond soon. Meanwhile, the #ask-ai channel awaits if you're curious!
Nurul
Nurul3d ago
You are correct! If you are generating Prisma Client at a custom path, then you would need to import it from the path you have generated at, and not from @prisma/client

Did you find this page helpful?