Skip to content

prisma CLI 8.0.0-rc.19 cannot emit with @prisma/orm-postgres 8.0.0-rc.14: CONTRACT.PACK_CONTRIBUTION_INVALID at "enum" (CLI bundles orm-toolchain rc.13) #30574

Description

@sss-Mihail-sss

Package and version

prisma@8.0.0-rc.19 (the CLI, latest) with @prisma/orm-postgres@8.0.0-rc.14 (latest) and @prisma/cli-engine@0.6.2

What happened?

prisma contract emit fails while resolving the contract source, on any contract, including a one-model TypeScript contract with no enums:

✘ [CONTRACT.PACK_CONTRIBUTION_INVALID] Malformed authoring pslBlock contribution at "enum". The value carries descriptor keys (kind/keyword/discriminator) but does not satisfy the pslBlock descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.
  docs: https://docs.prisma.io/docs/orm/v8/reference/error-reference/CONTRACT.PACK_CONTRIBUTION_INVALID

As far as I can tell, it is a version skew between the published CLI and the latest ORM:

  • prisma@8.0.0-rc.19 depends on @prisma/orm-toolchain@8.0.0-rc.13 (exact) and mounts it statically (import { ormCommandFamily } from "@prisma/orm-toolchain/cli" in dist/prisma.js), so the ORM commands always run on toolchain / framework rc.13, whatever the project installs.
  • In @prisma/orm-family-sql@8.0.0-rc.14, sqlFamilyPslBlockDescriptors.enum replaced parameters: {} and variadicParameters: true with spec: sqlFamilyEnumSpec.
  • isWellFormedDescriptor(value, "pslBlock") in @prisma/orm-framework@8.0.0-rc.13 requires a parameters object (rc.14 checks spec instead), so the rc.14 family pack that defineConfig from @prisma/orm-postgres/config hands to the CLI is refused.

examples/prisma-8-demo does not hit this because it runs the workspace @internal/cli@8.0.0-rc.14, not the published prisma package.

Related: pnpm reports unmet peers, because @prisma/orm-toolchain@8.0.0-rc.13 and @prisma/composer-cli@0.25.0 want @prisma/cli-engine@0.6.1, while prisma@8.0.0-rc.19 itself depends on 0.6.2, and the rc.13 → rc.14 upgrade guide (engine-pin-moves-to-0-6-2) moves the app's pin to 0.6.2.

What did you expect to happen?

The latest prisma CLI emits the contract of a project on the latest @prisma/orm-postgres, e.g. a prisma release that depends on @prisma/orm-toolchain@8.0.0-rc.14. Failing that, a message naming the skew ("this CLI's toolchain is 8.0.0-rc.13, the project's @prisma/orm-postgres is 8.0.0-rc.14") rather than a pack-contribution error that points at the user's contract.

Minimal reproduction

package.json:

{
  "name": "prisma-rc14-repro",
  "private": true,
  "type": "module",
  "dependencies": {
    "@prisma/orm-postgres": "8.0.0-rc.14"
  },
  "devDependencies": {
    "@prisma/cli-engine": "0.6.2",
    "prisma": "8.0.0-rc.19"
  }
}

prisma.config.ts:

import { definePrismaConfig } from "@prisma/cli-engine";
import { defineConfig as ormConfig } from "@prisma/orm-postgres/config";

export default definePrismaConfig({
  orm: ormConfig({
    contract: "./src/contract.ts",
    db: { connection: "postgresql://localhost:5432/unused" },
  }),
});

src/contract.ts:

import { defineContract } from "@prisma/orm-postgres/contract-builder";

export default defineContract({}, ({ field, model }) => {
  const Note = model("Note", {
    fields: { id: field.id.uuidv7Native(), body: field.text() },
  }).sql({ table: "notes" });
  return { models: { Note } };
});

pnpm install && pnpm exec prisma contract emit fails with the error above (pnpm needs allowBuilds for @prisma/orm-*, prisma and esbuild in pnpm-workspace.yaml).

  • With "@prisma/orm-postgres": "8.0.0-rc.13" and nothing else changed, the same project emits.
  • With @prisma/orm-postgres@8.0.0-rc.14 plus this in pnpm-workspace.yaml, it emits too, which is the workaround we use for now:
overrides:
  "prisma>@prisma/orm-toolchain": 8.0.0-rc.14

Environment

  • Node: 26.8.2
  • OS: macOS 27.0.1
  • Package manager: pnpm 12.6.0 (12.5.1 in our app, same result)
  • Database: Postgres; not reached, contract emit fails before connecting

Additional context

In our app (TypeScript contract, about 40 models, enumType value sets in the same form as the demo's UserEnum), toolchain rc.14 through the override emits a contract.json byte-identical to the one rc.13 emitted, and migration status / db verify are clean.

Activity

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