You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
composer-prisma-cloud pulls @prisma/cli-engine into every app through orm-toolchain #30437
@prisma/composer-prisma-cloud (prisma/composer) lists @prisma/orm-toolchain in dependencies, because it imports config-loader and migration-tools from it. orm-toolchain peers @prisma/cli-engine at an exact version, so every application that installs composer-prisma-cloud also gets the CLI engine. ADR 0004 (prisma-cli) says product libraries carry no engine relationship at all.
Proposed fix: publish config-loader and migration-tools in a package with no engine peer, and have composer-prisma-cloud depend on that instead.
Evidence from real installs, gathered on 2026-11-24 while deciding whether @prisma/composer-prisma-cloud should work around this by declaring @prisma/cli-engine as a peer itself. We decided against that, because the installs below show the peer does none of the things a peer is for: it does not make the toolchain find the engine where it cannot today (Yarn), it does not change how many engine copies are installed, and it does not make a mismatched prisma fail at install. Its one effect is that Yarn's warning names the engine. The fix proposed in this issue is the one that helps.
Versions:prisma 8.0.0-rc.35, @prisma/cli-engine 0.10.4, @prisma/orm-toolchain and @prisma/orm-postgres 8.0.0-rc.25, @prisma/composer and @prisma/composer-prisma-cloud 0.40.0. Package managers: npm 11.19.0, pnpm 10.27.0, Bun 1.3.13, Yarn 4.19.0.
Where the engine is reached. Only the toolchain's config-loader entry reaches the engine. Its shared chunk has a static, top-level import { configSchema, defineConfigSection, reference, validateSectionWithSchema } from "@prisma/cli-engine" and calls three of them at load to build the orm config section. The migration-tools/refs, migration-tools/spaces and migration-tools/io entries that Composer also imports do not reach the engine. So an engine-free package needs a home for those four config-schema helpers, or a config loader that does not use them.
What an app sees today. The app lists @prisma/composer, @prisma/composer-prisma-cloud, @prisma/orm-postgres and prisma. The probe imports @prisma/composer-prisma-cloud/control, which loads the toolchain's config loader.
Package manager
Engine copies
Does the probe load?
npm
1
yes
Bun
1
yes
pnpm, defaults
1
yes
Yarn 4, nodeLinker: node-modules
1, under prisma
no: the toolchain cannot reach the engine
Yarn 4, Plug'n'Play
1
no: @prisma/orm-toolchain tried to access @prisma/cli-engine (a peer dependency) but it isn't provided by its ancestors
Under Yarn the install prints only the summary YN0086: Some peer dependencies are incorrectly met by dependencies, which does not name the engine.
What a peer on the library would change. With "@prisma/cli-engine": "0.10.4" added to the peerDependencies of a repacked @prisma/composer-prisma-cloud: nothing under npm, Bun or pnpm. Under Yarn the probe still fails; the warning becomes YN0002: … doesn't provide @prisma/cli-engine, requested by @prisma/composer-prisma-cloud.
What makes Yarn work. The app lists @prisma/cli-engine itself. That has a side effect under Yarn and under pnpm: two engine instances. The engine peers on @prisma/management-api-sdk, prisma pins the SDK exactly (1.101.0), other ranges in the app resolve to a newer SDK (1.103.0), and both package managers make one engine instance per set of peers. Pinning @prisma/management-api-sdk in the app to the version prisma pins brings it back to one engine, shared with prisma.
A mismatched pair is not caught at install. With prisma 8.0.0-rc.34 (engine 0.10.0) beside toolchain 8.0.0-rc.25: npm installs two engines with no warning; pnpm prints unmet peer @prisma/[email protected]: found 0.10.0, exits 0, and the rc.25 toolchain then runs on engine 0.10.0.
The same gap applies to @prisma/orm-postgres, @prisma/orm-mongo, @prisma/orm-target-postgres and @prisma/orm-family-sql, which depend on the toolchain and do not pass its engine peer on. #30928 reports it from a user's side.
Activity
wmadden-electric commentedon Nov 23, 2026
Evidence from real installs, gathered on 2026-11-24 while deciding whether
@prisma/composer-prisma-cloudshould work around this by declaring@prisma/cli-engineas a peer itself. We decided against that, because the installs below show the peer does none of the things a peer is for: it does not make the toolchain find the engine where it cannot today (Yarn), it does not change how many engine copies are installed, and it does not make a mismatchedprismafail at install. Its one effect is that Yarn's warning names the engine. The fix proposed in this issue is the one that helps.Versions:
prisma8.0.0-rc.35,@prisma/cli-engine0.10.4,@prisma/orm-toolchainand@prisma/orm-postgres8.0.0-rc.25,@prisma/composerand@prisma/composer-prisma-cloud0.40.0. Package managers: npm 11.19.0, pnpm 10.27.0, Bun 1.3.13, Yarn 4.19.0.Where the engine is reached. Only the toolchain's
config-loaderentry reaches the engine. Its shared chunk has a static, top-levelimport { configSchema, defineConfigSection, reference, validateSectionWithSchema } from "@prisma/cli-engine"and calls three of them at load to build theormconfig section. Themigration-tools/refs,migration-tools/spacesandmigration-tools/ioentries that Composer also imports do not reach the engine. So an engine-free package needs a home for those four config-schema helpers, or a config loader that does not use them.What an app sees today. The app lists
@prisma/composer,@prisma/composer-prisma-cloud,@prisma/orm-postgresandprisma. The probe imports@prisma/composer-prisma-cloud/control, which loads the toolchain's config loader.nodeLinker: node-modulesprisma@prisma/orm-toolchain tried to access @prisma/cli-engine (a peer dependency) but it isn't provided by its ancestorsUnder Yarn the install prints only the summary
YN0086: Some peer dependencies are incorrectly met by dependencies, which does not name the engine.What a peer on the library would change. With
"@prisma/cli-engine": "0.10.4"added to thepeerDependenciesof a repacked@prisma/composer-prisma-cloud: nothing under npm, Bun or pnpm. Under Yarn the probe still fails; the warning becomesYN0002: … doesn't provide @prisma/cli-engine, requested by @prisma/composer-prisma-cloud.What makes Yarn work. The app lists
@prisma/cli-engineitself. That has a side effect under Yarn and under pnpm: two engine instances. The engine peers on@prisma/management-api-sdk,prismapins the SDK exactly (1.101.0), other ranges in the app resolve to a newer SDK (1.103.0), and both package managers make one engine instance per set of peers. Pinning@prisma/management-api-sdkin the app to the versionprismapins brings it back to one engine, shared withprisma.A mismatched pair is not caught at install. With
prisma8.0.0-rc.34 (engine 0.10.0) beside toolchain 8.0.0-rc.25: npm installs two engines with no warning; pnpm printsunmet peer @prisma/[email protected]: found 0.10.0, exits 0, and the rc.25 toolchain then runs on engine 0.10.0.The same gap applies to
@prisma/orm-postgres,@prisma/orm-mongo,@prisma/orm-target-postgresand@prisma/orm-family-sql, which depend on the toolchain and do not pass its engine peer on. #30928 reports it from a user's side.