IssueRaiser

[Prisma 7.0.0] TypeScript TS2742 errors with pnpm monorepo - cannot resolve @prisma/client-runtime-utils types

## Bug description After upgrading from Prisma 6.19.0 to Prisma 7.0.0 (released today, Nov 19, 2024), TypeScript compilation fails with `TS2742` errors in a pnpm monorepo setup with NestJS. The generated Prisma Client code cannot resolve types from `@prisma/client-runtime-utils` through pnpm's symlink structure. ## Reproduction steps ### Project Structure ``` library-system/ ├── apps/ │ └── api/ # NestJS app │ ├── prisma/ │ │ └── schema.prisma │ ├── generated/prisma/ # Custom output location │ └── package.json ├── package.json ├── pnpm-workspace.yaml └── .npmrc ``` ### Steps to reproduce 1. Set up a pnpm monorepo with NestJS 2. Configure Prisma with custom output: ```prisma generator client { provider = "prisma-client" output = "../generated/prisma" moduleFormat = "cjs" } ``` 3. Upgrade to Prisma 7.0.0: ```bash pnpm add @prisma/client@7.0.0 prisma@7.0.0 -D ``` 4. Run migrations and generate: ```bash pnpm exec prisma migrate dev pnpm exec prisma generate ``` 5. Try to start the NestJS dev server: ```bash pnpm run dev ``` ## Expected behavior The NestJS server should start without TypeScript compilation errors, as it did with Prisma 6.19.0. ## Actual behavior TypeScript compilation fails with multiple TS2742 errors: ``` apps/api dev: generated/prisma/internal/prismaNamespace.ts:114:14 - error TS2742: The inferred type of 'DbNull' cannot be named without a reference to '.pnpm/@pri

Posted by fsmm19 on Nov 19, 2025, 6:52 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments

onboarding (SaaS)

[Prisma 7.0.0] TypeScript TS2742 errors with pnpm monorepo - cannot resolve @prisma/client-runtime-utils types

fsmm19Nov 19, 2025, 6:52 PM

## Bug description After upgrading from Prisma 6.19.0 to Prisma 7.0.0 (released today, Nov 19, 2024), TypeScript compilation fails with `TS2742` errors in a pnpm monorepo setup with NestJS. The generated Prisma Client code cannot resolve types from `@prisma/client-runtime-utils` through pnpm's symlink structure. ## Reproduction steps ### Project Structure ``` library-system/ ├── apps/ │ └── api/ # NestJS app │ ├── prisma/ │ │ └── schema.prisma │ ├── generated/prisma/ # Custom output location │ └── package.json ├── package.json ├── pnpm-workspace.yaml └── .npmrc ``` ### Steps to reproduce 1. Set up a pnpm monorepo with NestJS 2. Configure Prisma with custom output: ```prisma generator client { provider = "prisma-client" output = "../generated/prisma" moduleFormat = "cjs" } ``` 3. Upgrade to Prisma 7.0.0: ```bash pnpm add @prisma/client@7.0.0 prisma@7.0.0 -D ``` 4. Run migrations and generate: ```bash pnpm exec prisma migrate dev pnpm exec prisma generate ``` 5. Try to start the NestJS dev server: ```bash pnpm run dev ``` ## Expected behavior The NestJS server should start without TypeScript compilation errors, as it did with Prisma 6.19.0. ## Actual behavior TypeScript compilation fails with multiple TS2742 errors: ``` apps/api dev: generated/prisma/internal/prismaNamespace.ts:114:14 - error TS2742: The inferred type of 'DbNull' cannot be named without a reference to '.pnpm/@pri

Comments (0)

No comments yet. Start the discussion.

Comment on this issue