-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Module '"@prisma/client"' has no exported member 'PrismaClient'.ts(2305) #13672
Copy link
Copy link
Open
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.tech/typescriptIssue for tech TypeScript.Issue for tech TypeScript.topic: linuxtopic: pnpmtopic: pnpm workspacestopic: prisma-client
Description
Bug description
I tried to use pnpm in my proj but it seems it does not work
I see this two issues too but none of them helped:
- "'node_modules/@prisma/client' has no exported member 'PrismaClient'." when using symlinks #2584
- Entity types cannot be resolved in PNPM monorepo #7484
How to reproduce
- Clone the repo: https://github.com/kasir-barati/basic-prisma-nestjs-restful-api
pnpm installpnpm prisma generate- open
src/shared/modules/prisma/prisma.service.ts - See error

Expected behavior
No error just import PrismaClient
Prisma information
See repo
Environment & setup
- OS:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy- Database: PostgreSQL
- Node.js version: v16.15.0
Prisma Version
$ pnpm prisma -v
prisma : 3.14.0
@prisma/client : 3.14.0
Current platform : debian-openssl-1.1.x
Query Engine (Node-API) : libquery-engine 2b0c12756921c891fec4f68d9444e18c7d5d4a6a (at node_modules/.pnpm/@prisma+engines@3.14.0-36.2b0c12756921c891fec4f68d9444e18c7d5d4a6a/node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
Migration Engine : migration-engine-cli 2b0c12756921c891fec4f68d9444e18c7d5d4a6a (at node_modules/.pnpm/@prisma+engines@3.14.0-36.2b0c12756921c891fec4f68d9444e18c7d5d4a6a/node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine : introspection-core 2b0c12756921c891fec4f68d9444e18c7d5d4a6a (at node_modules/.pnpm/@prisma+engines@3.14.0-36.2b0c12756921c891fec4f68d9444e18c7d5d4a6a/node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary : prisma-fmt 2b0c12756921c891fec4f68d9444e18c7d5d4a6a (at node_modules/.pnpm/@prisma+engines@3.14.0-36.2b0c12756921c891fec4f68d9444e18c7d5d4a6a/node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Default Engines Hash : 2b0c12756921c891fec4f68d9444e18c7d5d4a6a
Studio : 0.460.0Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.tech/typescriptIssue for tech TypeScript.Issue for tech TypeScript.topic: linuxtopic: pnpmtopic: pnpm workspacestopic: prisma-client