Repository navigation
Description
Bug description
Importing the published @prisma/migrate package at version 7.9.0 fails immediately because its generated CommonJS bundle requires:
@prisma/internals/src/cli/completion-values
The published @prisma/internals package contains the compiled module under dist/cli/completion-values.js, but does not publish the referenced src/cli/completion-values path.
This appears related to the tab-completion imports introduced in #28351.
Severity
Reproduction
mkdir prisma-migrate-repro
cd prisma-migrate-repro
npm init -y
npm install @prisma/[email protected] @prisma/[email protected]
node -e "require('@prisma/migrate')"No database or Prisma schema is required to reproduce the failure.
Expected vs. Actual Behavior
Expected: require('@prisma/migrate') loads the package successfully.
Actual: Node.js throws MODULE_NOT_FOUND before any migrate API can be used:
Error: Cannot find module '@prisma/internals/src/cli/completion-values'
Require stack:
- node_modules/@prisma/migrate/dist/chunk-WA2SOLDQ.js
- node_modules/@prisma/migrate/dist/index.js
- [eval]
Frequency
Consistently reproducible
Does this occur in development or production?
Both development and production
We encountered it in an AWS Lambda that uses @prisma/migrate programmatically, and the minimal local reproduction fails identically.
Is this a regression?
Yes. The same programmatic usage worked with Prisma 7.8.0 and broke after upgrading to 7.9.0.
Workaround
Either downgrade to Prisma 7.8.0 or create a compatibility shim at @prisma/internals/src/cli/completion-values.js that re-exports @prisma/internals/dist/cli/completion-values.js.
Prisma Schema & Queries
Not applicable. The package fails during module loading before a schema, database connection, or query is used.
Environment & Setup
- OS: macOS 26.5 (Darwin 25.5.0), also reproduced in AWS Lambda
- Database: Not applicable
- Node.js version: v22.17.0 locally; production bundle targets Node.js 24
- Package manager: npm 11.9.0
Prisma Version
prisma : 7.9.0
@prisma/client : 7.9.0
@prisma/migrate : 7.9.0
@prisma/internals : 7.9.0
Operating System : darwin
Architecture : arm64
Node.js : v22.17.0
TypeScript : 6.0.3
Query Compiler : enabled
PSL : @prisma/prisma-schema-wasm 7.9.0-1.e922089b7d7502aff4249d5da3420f6fa55fc6ad
Schema Engine : schema-engine-cli e922089b7d7502aff4249d5da3420f6fa55fc6ad
Default Engines Hash : e922089b7d7502aff4249d5da3420f6fa55fc6ad
Studio : 0.33.0
Activity
clemens commentedon Jul 28, 2026
I can confirm this, we're seeing the same in our setup with a custom migration script (that loads
@prisma/migrate).santichausis commentedon Jul 28, 2026
I'd like to take this on — the fix is to import from the public
@prisma/internalsentry (which already re-exports every value these completion files need) instead of the internalsrc/cli/completion-valuespath, matching how the rest of the codebase imports from@prisma/internals. Opening a PR shortly across all the affected completion files.fix(migrate,cli): import from @prisma/internals's public entry, not i…
chore(cli,lint): remove the last deep src/ import and guard against n…
clemens commentedon Aug 6, 2026
Just FYI this is still broken in 7.9.1.
santichausis commentedon Aug 6, 2026
@clemens that's expected for now — 7.9.1 was published on 2026-07-27, and the fix (#29836) merged on 2026-07-29, two days later. It's on
v7but hasn't gone out in a patch release yet.fix(migrate,cli): import from @prisma/internals's public entry, not i…
chore(cli,lint): remove the last deep src/ import and guard against n…
wmadden-electric commentedon Nov 19, 2026
Fixed on
v7by #29836.