Replies: 13 comments 36 replies
|
You need to generate the prisma client using I find that it helps when you cmd+click into |
|
Hi there, To keep our discussions organized and focused on the most relevant topics, we’re reviewing and tidying up our backlog. As part of this process, we’re closing discussions that have already been marked as answered but remain open. If this discussion still requires further input or clarification, feel free to reopen it or start a new one with updated details. Your contributions are invaluable to the community, and we’re here to help! For more details about our priorities and vision for the future of Prisma ORM, check out our latest blog post: https://www.prisma.io/blog/prisma-orm-manifesto. Thank you for your understanding and ongoing support of the Prisma community! |
|
I had a similar problem and it was resolved by rm -rf node_modules |
|
I had the same problem after I make "npx prisma generate" but you can directly insert the url of PrismaClient folder instead of using "@prisma/client" you can use something "../generated/prisma" like this based on the generated PrismaClient folder |
|
I have faced the same problem. when i commented the output path in schema.prisma file , it generated the output inside the node module and error gone. |
|
Facing similar problems just make the changes in schema file generator client { |
|
i was facing same issue ->Module '"@prisma/client"' has no exported member 'PrismaClient' import { PrismaClient } from '@prisma/client'; but my compiler was throwing error Module '"@prisma/client"' has no exported member 'PrismaClient'. so in my case my schema.prisma, I had this generator block: -> so either you have to delete this output = "../generated/prisma" -> this output part or either you have to |
|
1. Make sure that prisma is installed 2. Add the generator definition in schema.prisma file 3. Then install @prisma/client 4. Then run the following command 5. Then instantiate prisma client This is the best way according to documentation. |
|
I opened my schema.prisma file. I removed the output line inside the generator client block. Previous example: I updated the provider value to prisma-client-js. Final version: Then I ran the following command: ` ` Pressed Ctrl + Shift + P Selected Restart TS Server 🎯 Result After these steps, the error was completely resolved. Hope this helps someone facing the same issue 👍 |
|
That means: ❌ You can no longer just call new PrismaClient() without configuration. Step 1: Install the Prisma 7 Postgres Adapter 🔌I opened the terminal and installed the required packages: These packages allow Prisma to connect to Postgres using the new adapter system. Step 2: Import the Adapter and Configure Prisma ⚙️To use the adapter, I imported it in the file where I create the Prisma client (for example, lib/prisma.ts): Then I created a Postgres connection pool and passed the adapter to Prisma: The key point here is this: Step 3: Restart and Test 🚀I saved the file. Then I restarted the development server:
Once the server was running again, I went back to Thunder Client and resent the POST request. This time Prisma will:
|
|
This is not for not being supported by VsCode, i even tried by using Cursor |
|
if you want to configure your shema.prisma with Default output, it should be like this: then use like this: otherwise if you want to configurate with custom, your client configuration should be like this: then use like this: I used the default output for the nestjs app(recommended) prisma.service.ts shema.prisma |


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Bug description
I'm getting this error in VScode after following this example's getting started steps, in the provided
seed.tsfile.Other imports work just fine.
I have never used Prisma before. I'm just following the steps listed.
This problem popped up after the step
npm i, which tells me either the example is set up wrong, or something specific on my computer is bollocksing up something. No idea. I assume these examples have been tested at some point, so I guess it must be something on my end. Otoh, I have never had this problem with typescript packages if they properly export their things.How to reproduce
Literally follow this:
https://github.com/prisma/prisma-examples/tree/latest/typescript/rest-nextjs-api-routes-auth
Expected behavior
No errors.
Prisma information
I really don't think it's relevant what the schema is. If it is, please have a look at the linked example 😉
Environment & setup
Prisma Version
All reactions