-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Using Prisma with pnpm results in inability to call database related commands #18238
Copy link
Copy link
Closed
Closed
Copy link
Labels
bug/1-unconfirmedBug should have enough information for reproduction, but confirmation has not happened yet.Bug should have enough information for reproduction, but confirmation has not happened yet.kind/bugA reported bug.A reported bug.topic: pnpm
Milestone
Description
Bug description
I am using pnpm with Prisma in my app, but whenever I try running prisma migrate dev or prisma generate, the program hangs for about 10 minutes before returning an error.
Running generate... (Use --skip-generate to skip the generators)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @eslint/eslintrc@2.0.0
npm WARN Found: peer eslint-plugin-jsdoc@">=22.1.0" from eslint-config-eslint@7.0.0
npm WARN node_modules/.pnpm/@eslint+eslintrc@2.0.0/node_modules/@eslint/eslintrc/node_modules/eslint-config-eslint
npm WARN dev eslint-config-eslint@"^7.0.0" from @eslint/eslintrc@2.0.0
npm WARN node_modules/.pnpm/@eslint+eslintrc@2.0.0/node_modules/@eslint/eslintrc
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer eslint-plugin-jsdoc@">=22.1.0" from eslint-config-eslint@7.0.0
npm WARN node_modules/.pnpm/@eslint+eslintrc@2.0.0/node_modules/@eslint/eslintrc/node_modules/eslint-config-eslint
npm WARN dev eslint-config-eslint@"^7.0.0" from @eslint/eslintrc@2.0.0
npm WARN node_modules/.pnpm/@eslint+eslintrc@2.0.0/node_modules/@eslint/eslintrc
npm ERR! Cannot read properties of null (reading 'matches')
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2023-03-06T21_07_48_240Z-debug-0.log
Error: Command failed with exit code 1: npm install @prisma/client@4.11.0
How to reproduce
- Install Prisma using pnpm
- Write some models in the Prisma schema
- Run
pnpm prisma migrate devorpnpm prisma generate
Expected behavior
I expected Prisma to play nicely with the pnpm format, but it didn't. It seems like the problem might be a mismatch between the usage of pnpm and npm when installing @prisma/client, because even on my pnpm project, it still says that npm install @prisma/client was used.
Prisma information
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
model User {
id Int @id @default(autoincrement())
username String @unique
password String
}Environment & setup
- OS: WSL
- Database: SQLite
- Node.js version: 18.12.1
Prisma Version
4.11.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug/1-unconfirmedBug should have enough information for reproduction, but confirmation has not happened yet.Bug should have enough information for reproduction, but confirmation has not happened yet.kind/bugA reported bug.A reported bug.topic: pnpm