Skip to content

@prisma/migrate 7.9.0 requires unpublished @prisma/internals completion module #29772

Closed

Description

@StephanDecker

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

⚠️ Major: Breaks core functionality (e.g., migrations fail)

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

  1. clemens commented on Jul 28, 2026

    @clemens
    Contributor

    I can confirm this, we're seeing the same in our setup with a custom migration script (that loads @prisma/migrate).

  2. santichausis commented on Jul 28, 2026

    @santichausis
    Contributor

    I'd like to take this on — the fix is to import from the public @prisma/internals entry (which already re-exports every value these completion files need) instead of the internal src/cli/completion-values path, matching how the rest of the codebase imports from @prisma/internals. Opening a PR shortly across all the affected completion files.

  3. added 2 commits that reference this issue on Jul 29, 2026
    e81d601
    e312a9c
  4. clemens commented on Aug 6, 2026

    @clemens
    Contributor

    Just FYI this is still broken in 7.9.1.

  5. santichausis commented on Aug 6, 2026

    @santichausis
    Contributor

    @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 v7 but hasn't gone out in a patch release yet.

  6. added 2 commits that reference this issue on Aug 9, 2026
    47d12a2
    15c30eb
  7. wmadden-electric commented on Nov 19, 2026

    @wmadden-electric
    Contributor

    Fixed on v7 by #29836.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions