@prisma/client still points to .prisma/client instead of custom-set output

I recently modified my schema to use the new "prisma-client" provider, and I had to specify an output path for where the generated files will be.
generator client {
provider = "prisma-client"
previewFeatures = ["driverAdapters"]
output = "../src/generated/prisma"
}
generator client {
provider = "prisma-client"
previewFeatures = ["driverAdapters"]
output = "../src/generated/prisma"
}
The problem is, @prisma/client still points to the client generated in node_modules? I don't understand this stuff fully, but shouldn't node_modules/@prisma/client/default.d.ts export from "../src/generated/prisma" instead of this:
export * from '.prisma/client/default'
export * from '.prisma/client/default'
Either I'm doing something really wrong or I need to explicitly import from the custom output path I set, instead of from @prisma/client 🤷‍♂️
3 Replies
Prisma AI Help
You're in no rush, so we'll let a dev step in. Enjoy your coffee, or drop into #ask-ai if you get antsy for a second opinion!
JessePinkman
JessePinkmanOP4w ago
I did npx prisma generate and I can see the code generated in the output path I set. So, what is the proper way to import those models/enums/types since '@prisma/client' seems to not be working? I think this is a solution to the same problem I'm facing https://github.com/prisma/prisma/discussions/25127#discussioncomment-10544171 But is this really the only way, even after prisma 6.13? I ended up changing my import statements to use "@/generated/prisma/client" but now I'm facing the same issues this user faced: https://discord.com/channels/937751382725886062/1364689190549323938
Nurul
Nurul3w ago
Hey! Could you share the exact error message you are getting? Are you using any client extensions?

Did you find this page helpful?