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.
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.2What happened?
prisma contract emitfails while resolving the contract source, on any contract, including a one-model TypeScript contract with no enums:As far as I can tell, it is a version skew between the published CLI and the latest ORM:
prisma@8.0.0-rc.19depends on@prisma/orm-toolchain@8.0.0-rc.13(exact) and mounts it statically (import { ormCommandFamily } from "@prisma/orm-toolchain/cli"indist/prisma.js), so the ORM commands always run on toolchain / framework rc.13, whatever the project installs.@prisma/orm-family-sql@8.0.0-rc.14,sqlFamilyPslBlockDescriptors.enumreplacedparameters: {}andvariadicParameters: truewithspec: sqlFamilyEnumSpec.isWellFormedDescriptor(value, "pslBlock")in@prisma/orm-framework@8.0.0-rc.13requires aparametersobject (rc.14 checksspecinstead), so the rc.14 family pack thatdefineConfigfrom@prisma/orm-postgres/confighands to the CLI is refused.examples/prisma-8-demodoes not hit this because it runs the workspace@internal/cli@8.0.0-rc.14, not the publishedprismapackage.Related: pnpm reports unmet peers, because
@prisma/orm-toolchain@8.0.0-rc.13and@prisma/composer-cli@0.25.0want@prisma/cli-engine@0.6.1, whileprisma@8.0.0-rc.19itself depends on0.6.2, and the rc.13 → rc.14 upgrade guide (engine-pin-moves-to-0-6-2) moves the app's pin to0.6.2.What did you expect to happen?
The latest
prismaCLI emits the contract of a project on the latest@prisma/orm-postgres, e.g. aprismarelease 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-postgresis 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:src/contract.ts:pnpm install && pnpm exec prisma contract emitfails with the error above (pnpm needsallowBuildsfor@prisma/orm-*,prismaandesbuildinpnpm-workspace.yaml)."@prisma/orm-postgres": "8.0.0-rc.13"and nothing else changed, the same project emits.@prisma/orm-postgres@8.0.0-rc.14plus this inpnpm-workspace.yaml, it emits too, which is the workaround we use for now:Environment
contract emitfails before connectingAdditional context
In our app (TypeScript contract, about 40 models,
enumTypevalue sets in the same form as the demo'sUserEnum), toolchain rc.14 through the override emits acontract.jsonbyte-identical to the one rc.13 emitted, andmigration status/db verifyare clean.