DOCUMENTATION / v1.0.0

Prisma preparation & errors

Choose the workflow for the installed Prisma major.

Generate or emit, before build

Installed versionPortal 1.0.0 behavior
Prisma 2–7Read the package bin and run the local CLI with generate.
Prisma 8, including RCsRead the package bin and run contract emit.
No Prisma indicatorsSkip Prisma preparation.
Other/invalid versionStop with an unsupported/invalid-version diagnostic.

Detection uses dependencies, standard schema files, package.json schema settings or Prisma config files in the selected directory. Preparation runs after dependency installation, even with build disabled, using the project environment. The CLI reads config itself. Portal does not download a CLI or run migration, reset, seed, db init, db update or db sign.

Inspect the installed package

Run this in an installed development checkout of the selected directory. It prints only the package version and CLI entry, not environment secrets. If the package is actually missing, add prisma at a version compatible with the app runtime/client, update and commit its lockfile, then test locally. Do not add a second Prisma version just to satisfy an old hardcoded Portal path.

node -e "const p=require('./node_modules/prisma/package.json'); console.log({version:p.version, bin:p.bin})"

Keep config compatible with your major

Prisma 2–7 uses a schema and client generator. For a custom path, use config supported by the installed version. Prisma 8 uses an orm contract configuration. Current Prisma 8 config uses definePrismaConfig from prisma/config with the database-specific defineConfig helper; earlier release candidates can have different imports. Do not rewrite working RC config using a newer example without checking the installed exports. A config file cannot fix a Portal CLI-path mismatch.

Keep an explicit contract:emit build script if the app needs it; automatic Prisma 8 preparation emits first. If no Prisma dependencies, schema settings, standard schemas or config files exist, no config is required.

Prisma 8 configuration · Contract emit

Handle the right failure

EvidenceAction
Local CLI missing; prisma package absentAdd the compatible local dependency, install and commit the lockfile.
0.8.7/0.8.8 says CLI missing; Prisma 8 dist/prisma.js existsPortal compatibility issue. Portal 0.8.9 resolves it; no extra project config is needed.
CLI entry missing/invalid or version unsupportedCheck installed metadata, dependency versions, lockfile and selected directory.
Client generation or contract emission failedRead redacted deploy details; check schema/contract, version-specific config and required environment.
Lockfile mismatchReconcile package.json and the lockfile in development and commit both.
Candidate failed; prior release activeVerify the active service separately. Retry after fixing the source of failure.

Do not include DATABASE_URL, tokens or full environment output in an error report. A failed preparation stops the candidate before activation; inspect the active release and its health independently.

Last audited: 2026-10-15
Published source · v1.0.0