migrate dev not working in prisma 6.7.0
Hi,
I'm having issuew with @prisma/client types...
After running the migrate dev command, types are not generated...
Error
Module '"@prisma/client"' has no exported member 'User'
1 Reply
You've gone full bot mode! Let me fetch that AI answer for you ASAP.
With Prisma 6.7.0, if you set a custom output path for the client (like output = "./generated" in your schema), you must import your types (e.g., User, PrismaClient) from that generated path, not from @prisma/client. The error occurs because @prisma/client no longer contains the generated types when a custom output is used.
How to fix:
1. Make sure you run npx prisma generate (or pnpm prisma generate) after migrate dev to generate the client in ./generated.
2. Change your imports from:
to:
(Adjust the path as needed based on your project structure.)
This change is required as of Prisma 6.6.0+ when using a custom output path for the client. See the official documentation for more details: Generating Prisma Client: Using a custom output path and confirmation from recent issues and discussions PrismaClient without types, Module '"@prisma/client"' has no exported member 'PrismaClient', Module '"@prisma/client"' has no exported member 'User'.
Summary:
If you use a custom output, always import from that output path, not @prisma/client. If you want to keep using @prisma/client, remove the output field from your generator block. ✅ Great, thanks for letting us know that this solved your question!
If you use a custom output, always import from that output path, not @prisma/client. If you want to keep using @prisma/client, remove the output field from your generator block. ✅ Great, thanks for letting us know that this solved your question!