Repository navigation
Closed
Labels
bug/1-unconfirmedBug should have enough information for reproduction, but confirmation has not happened yet.kind/bugA reported bug.trackedThis issue is internally tracked by the Prisma Team on Linear.
Description
Bug description
Modern Corepack is strict by default, and in turn, respects the defined packageManager. Any command for node package management that's outside of the defined manager would fail.
prisma init uses npm to (temporarily) install @prisma/cli-init.
Severity
Reproduction
- Make sure Corepack is installed properly and has the latest Pnpm (currently 10.18.3):
corepack enable - Initialize a new project:
pnpm init - Make sure this line exist:
"packageManager": "[email protected]", - Make sure running
npmfails with:This project is configured to use pnpm because <current dir>/package.json has a "packageManager" field - Initialize Prisma:
pnpm dlx prisma init
Expected vs. Actual Behavior
Expected
Successfully initialized and outputs:
Fetching latest updates for this subcommand...
✔ Your Prisma schema was created at prisma/schema.prisma
You can now open it in your favorite editor.
warn You already have a .gitignore file. Don't forget to add `.env` in it to not commit any private information.
Next steps:
1. Run prisma dev to start a local Prisma Postgres server.
2. Define models in the schema.prisma file.
3. Run prisma migrate dev to migrate your local Prisma Postgres database.
4. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and a managed serverless Postgres database. Read: https://pris.ly/cli/beyond-orm
More information in our documentation:
https://pris.ly/d/getting-started
Actual
Threw a similar error:
Fetching latest updates for this subcommand...
This project is configured to use pnpm because <current dir>/package.json has a "packageManager" field
ERROR Failed to install dynamic subcommand via npm.
This subcommand is dynamically loaded and therefore requires npm to be installed.
Please install npm and rerun this command.
Underlying Error:
Error: Command failed with exit code 1: npm install @prisma/cli-init@latest --no-save --prefix /tmp/@prisma/cli-init@latest-1760547600000 --userconfig /tmp/@prisma/cli-init@latest-1760547600000 --loglevel error
Frequency
Consistently reproducible
Does this occur in development or production?
Both development and production
Is this a regression?
Not that I'm aware of.
Workaround
- Change directory outside project:
cd - Manually run the underlying error:
npm install @prisma/cli-init@latest --no-save --prefix /tmp/@prisma/cli-init@latest-1760547600000 --userconfig /tmp/@prisma/cli-init@latest-1760547600000 --loglevel error
- Go back to the project directory:
cd <project dir> - Initialize Prisma:
pnpm dlx prisma init
Prisma Schema & Queries
Irrelevant.
Prisma Config
No response
Logs & Debug Info
No response
Environment & Setup
npx envinfo --system --npmPackages prisma --binaries:
System:
OS: Linux 6.17 Arch Linux
CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
Memory: 3.13 GB / 15.34 GB
Container: Yes
Shell: 4.1.2 - /usr/bin/fish
Binaries:
Node: 24.9.0 - /usr/bin/node
pnpm: 10.18.3 - /usr/bin/pnpm
bun: 1.2.23 - /usr/bin/bun
npmPackages:
prisma: 6.17.1
Prisma Version
pnpm exec prisma -v:
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
prisma : 6.17.1
@prisma/client : Not found
Computed binaryTarget : debian-openssl-1.1.x
Operating System : linux
Architecture : x64
Node.js : v24.9.0
TypeScript : 5.9.3
Query Engine (Node-API) : libquery-engine 272a37d34178c2894197e17273bf937f25acdeac (at ../../node_modules/.pnpm/@[email protected]/node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
PSL : @prisma/prisma-schema-wasm 6.17.1-1.272a37d34178c2894197e17273bf937f25acdeac
Schema Engine : schema-engine-cli 272a37d34178c2894197e17273bf937f25acdeac (at ../../node_modules/.pnpm/@[email protected]/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x)
Default Engines Hash : 272a37d34178c2894197e17273bf937f25acdeac
Studio : 0.511.0
Metadata
Metadata
Assignees
Labels
bug/1-unconfirmedBug should have enough information for reproduction, but confirmation has not happened yet.kind/bugA reported bug.trackedThis issue is internally tracked by the Prisma Team on Linear.
Activity
fix: fix usage of prisma init with corepack (#28504)
fix: fix usage of prisma init with corepack (#28504)
fix: fix usage of prisma init with corepack (#28504)
fix: fix usage of prisma init with corepack (prisma#28504)
ryansuhartanto commentedon Nov 18, 2025
Thank you! 😊