-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Automatic installation of missing dependencies isn't compatible with pnpm #14401
Copy link
Copy link
Closed
Closed
Copy link
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.topic: pnpmtopic: prisma generateCLI: prisma generateCLI: prisma generate
Milestone
Description
Bug description
PNPM: https://pnpm.io
When I follow the getting started guide but use PNPM instead of NPM, pnpx fails at the migrate step:
$ pnpx prisma migrate dev --name init
How to reproduce
- Follow the steps here, but using PNPM instead of NPM: https://www.prisma.io/docs/getting-started/setup-prisma/start-from-scratch/relational-databases-typescript-postgres
- The
migratestep fails:
PS C:\Users\Behrang\Documents\Projects\github.com\behrangsa\xyz-doodles\doodle-5> pnpx prisma migrate dev --name init
.../Local/pnpm/store/v3/tmp/dlx-24148 | +2 +
Packages are hard linked from the content-addressable store to the virtual store.
Content-addressable store is at: C:\Users\Behrang\AppData\Local\pnpm\store\v3
Virtual store is at: ../../../../../../AppData/Local/pnpm/store/v3/tmp/dlx-24148/node_modules/.pnpm
.../Local/pnpm/store/v3/tmp/dlx-24148 | Progress: resolved 2, reused 2, downloaded 0, added 2, done
Environment variables loaded from .env
Prisma schema loaded from prisma\schema.prisma
Datasource "db": PostgreSQL database "mydb", schema "public" at "localhost:49154"
PostgreSQL database mydb created at localhost:49154
Applying migration `20220720081027_init`
The following migration(s) have been created and applied from new schema changes:
migrations/
└─ 20220720081027_init/
└─ migration.sql
Your database is now in sync with your schema.
Running generate... (Use --skip-generate to skip the generators)
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm ERR! Cannot read properties of null (reading 'isDescendantOf')
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Behrang\scoop\persist\nodejs\cache\_logs\2022-07-20T08_10_30_080Z-debug-0.log
Error: Command failed with exit code 1: npm install @prisma/client@4.1.0
ERROR Command failed with exit code 1: C:\Users\Behrang\AppData\Local\pnpm\store\v3\tmp\dlx-24148\node_modules\.bin\prisma.CMD migrate dev --name init
2022-07-20T08_10_30_080Z-debug-0.log
Expected behavior
Prisma to work with PNPM.
Prisma information
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model Post {
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
title String @db.VarChar(255)
content String?
published Boolean @default(false)
author User @relation(fields: [authorId], references: [id])
authorId Int
}
model Profile {
id Int @id @default(autoincrement())
bio String?
user User @relation(fields: [userId], references: [id])
userId Int @unique
}
model User {
id Int @id @default(autoincrement())
email String @unique
name String?
posts Post[]
profile Profile?
}
Environment & setup
- OS: Windows 11
- Database: PostgreSQL
- Node.js version: v18.4.0
Prisma Version
.../Local/pnpm/store/v3/tmp/dlx-33356 | +2 +
Packages are hard linked from the content-addressable store to the virtual store.
Content-addressable store is at: C:\Users\Behrang\AppData\Local\pnpm\store\v3
Virtual store is at: ../../../../../../AppData/Local/pnpm/store/v3/tmp/dlx-33356/node_modules/.pnpm
.../Local/pnpm/store/v3/tmp/dlx-33356 | Progress: resolved 2, reused 2, downloaded 0, added 2, done
Environment variables loaded from .env
prisma : 4.1.0
@prisma/client : Not found
Current platform : windows
Query Engine (Node-API) : libquery-engine 8d8414deb360336e4698a65aa45a1fbaf1ce13d8 (at ..\..\..\..\..\..\AppData\Local\pnpm\store\v3\tmp\dlx-33356\node_modules\.pnpm\@prisma+engines@4.1.0\node_modules\@prisma\engines\query_engine-windows.dll.node)
Migration Engine : migration-engine-cli 8d8414deb360336e4698a65aa45a1fbaf1ce13d8 (at ..\..\..\..\..\..\AppData\Local\pnpm\store\v3\tmp\dlx-33356\node_modules\.pnpm\@prisma+engines@4.1.0\node_modules\@prisma\engines\migration-engine-windows.exe)
Introspection Engine : introspection-core 8d8414deb360336e4698a65aa45a1fbaf1ce13d8 (at ..\..\..\..\..\..\AppData\Local\pnpm\store\v3\tmp\dlx-33356\node_modules\.pnpm\@prisma+engines@4.1.0\node_modules\@prisma\engines\introspection-engine-windows.exe)
Format Binary : prisma-fmt 8d8414deb360336e4698a65aa45a1fbaf1ce13d8 (at ..\..\..\..\..\..\AppData\Local\pnpm\store\v3\tmp\dlx-33356\node_modules\.pnpm\@prisma+engines@4.1.0\node_modules\@prisma\engines\prisma-fmt-windows.exe)
Default Engines Hash : 8d8414deb360336e4698a65aa45a1fbaf1ce13d8
Studio : 0.467.0
Reactions 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.topic: pnpmtopic: prisma generateCLI: prisma generateCLI: prisma generate