I'm using `prisma@3.12.0` , but still have trouble...
# orm-help
h
I'm using
prisma@3.12.0
, but still have trouble with prisma client in yarn workspace.
Copy code
// .../my-app/packages/web/pages/api/auth/[...nextauth].ts

...
import { PrismaClient } from "@my-app/prisma";

const prisma = new PrismaClient();

...
when I run it, it throw error
Copy code
Error: ENOENT: no such file or directory, open '.../my-app/packages/web/.next/server/pages/api/auth/schema.prisma'
How can I fix it?
n
Hey 👋 Is there a
schema.prisma
file at ‘.../my-app/packages/web/.next/server/pages/api/auth/schema.prisma’ location?
h
no.
schema.prisma
is at '.../my-app/packages/prisma/schema.prisma'
n
Can you try adding an
output
path in your generator and importing PrismaClient from that path? Here’s the reference for using custom output path
h
I already did it. I added
output = "../packages/prisma"
, and imported from
@my-app/prisma
. But Nextjs still try to open it from wrong path.😭
n
Can you delete yarn cache and node_modules and try again after removing the custom path. I found a related GitHub Issue and for them it worked after deleting cache
h
um... do you mean delete my custom path and import { PrismaClient } from "@prisma/client"? If not, I delete cache and custom path, then make it again and generate. but it throw same error...
n
Okay, Can you please create a Bug Report and provide details on how could we reproduce it?
h
Thank you. I create Issue