PrismaP
Prisma9mo ago
2 replies
mossman1120

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"
}
and see that to use the client I should import as follows:
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!
This page explains how to generate Prisma Client. It also provides additional context on the generated client, typical workflows and Node.js configuration.
Generating Prisma Client | Prisma Documentation
Was this page helpful?