Skip to content
Nilay Kabariya

Entry No.048·Database··4 min read

prisma generate not working: "No command registered" (Prisma 8)

npm now installs a Prisma 8 release candidate as prisma@latest. It has no generate, migrate dev or db push. Reproduced, with the fix for Docker and CI.

The error, verbatim

Jump to the fix ↓
{"kind":"result","envelope":{"ok":false,"commandId":"","error":{"code":"CLI.UNKNOWN_COMMAND","severity":"error","summary":"No command registered for `generate`","nextActions":[{"kind":"run-command","label":"List every command","command":"prisma --help"}]}}}

Tested on

prisma (latest tag)
8.0.0-rc.20
prisma / @prisma/client
7.10.0
Postgres
17 (Docker)
Node / OS
24.14.0 / Windows 11 Pro

✓ Re-verified on prisma 8.0.0-rc.21, @prisma/client 7.10.0 (Linux): 4/4 checks still hold · results

Contents
  1. Check which CLI you have01
  2. The fix for an existing Prisma 7 app02
  3. Docker and CI: npx prisma without a version03
  4. If you already ran prisma init on the new CLI04
  5. Watch out for the update banner05
  6. Moving to Prisma 8 instead06
  7. What didn’t work07
  8. How this was tested08

Nothing is wrong with your schema. On npm, prisma@latest now points to 8.0.0-rc.20, a release candidate of Prisma ORM 8. It’s a new command-line tool that doesn’t read schema.prisma and has no generate, migrate dev or db push. Meanwhile @prisma/client@latest is still 7.10.0. So a fresh npm i prisma @prisma/client today gives you two different major versions, and every Prisma 7 tutorial breaks at the first command.

I checked it on October 7, 2026 with a fresh install:

$ npm view prisma dist-tags.latest
8.0.0-rc.20
$ npm view @prisma/client dist-tags.latest
7.10.0

These are the Prisma 7 commands I ran against it, each in the CLI’s new JSON output:

You ran Prisma 8 RC answered
npx prisma generate No command registered for `generate`
npx prisma migrate dev No command registered for `migrate`, did you mean `migration`?
npx prisma db push No command registered for `push`, did you mean `update`?
npx prisma validate No command registered for `validate`

Check which CLI you have

npx prisma --version tells you straight away. Prisma 7 prints a table (prisma : 7.10.0, @prisma/client : 7.10.0 and so on). The 8 release candidate prints one line of JSON:

{"kind":"result","envelope":{"ok":true,"commandId":"version","result":{"version":"8.0.0-rc.20"},...}

If you see JSON, you’re on Prisma 8.

The fix for an existing Prisma 7 app

Prisma 8 isn’t final yet: Prisma’s own release status page calls it a release candidate, with general availability expected in October 2026. The same page says Prisma 7 keeps getting bug fixes and security updates for 18 months after that. If you have a working Prisma 7 app, the move is a rewrite (no @prisma/client, a new schema format, new commands), not a version bump.

Pin the CLI to the same major version as your client:

npm i -D prisma@7

npm saves that as ^7.10.0, which stays on 7.x. Then the usual commands work again:

$ npx prisma generate
✔ Generated Prisma Client (7.10.0) to .\src\generated\prisma in 117ms
$ npx prisma migrate dev --name init
Datasource "db": PostgreSQL database "postgres", schema "public" at "localhost:55432"

Docker and CI: npx prisma without a version

This is where most of the breakage is. A Dockerfile or CI step that runs npx prisma generate in a place where Prisma isn’t installed (a slim production image, a separate migration job) makes npx download whatever latest is. I ran it in an empty folder with only prisma/schema.prisma in it:

$ npx -y prisma generate
{"kind":"result","envelope":{"ok":false,...,"summary":"No command registered for `generate`",...}}

Public repos have been filing the same failure since early September: Docker images, Railway deploys, a self-hosted release script, and Prisma’s own Claude Code plugin (“unpinned npx -y prisma mcp now resolves to 8.0.0”).

Put the major version in the command itself:

npx -y prisma@7 generate

Better still, keep prisma in devDependencies with the ^7 range and install from your lockfile (npm ci) before running it. Then npx uses the local copy instead of downloading latest.

If you already ran prisma init on the new CLI

npx prisma init with 8.0.0-rc.20 doesn’t create prisma/schema.prisma or .env. In my test it created:

  • a prisma.config.ts that imports definePrismaConfig and only lists AI agents,
  • .claude, .cursor, .agents and .devin folders with Prisma “skills” in them,
  • a postinstall script in package.json: prisma skills sync || exit 0.

That config file breaks the old CLI even after the fix above. With it in place, Prisma 7.10.0 refused to start:

Failed to load config file "D:\nk-repro\prisma-init" as a TypeScript/JavaScript module.
Error: TypeError: (0 , _config.definePrismaConfig) is not a function

Replace prisma.config.ts with a Prisma 7 config (Prisma 7 reads the connection URL from here, not from the schema):

import 'dotenv/config';
import { defineConfig, env } from 'prisma/config';

export default defineConfig({
  schema: 'prisma/schema.prisma',
  migrations: { path: 'prisma/migrations' },
  datasource: { url: env('DATABASE_URL') },
});

Then delete the postinstall line, and the four agent folders if you don’t want them.

Watch out for the update banner

Once the fix above is in, the Prisma 7 CLI shows an “update available” box at the end of some commands. Mine ended with:

│  Run the following to update                            │
│    npm i --save-dev prisma@latest                       │
│    npm i @prisma/client@latest                          │

Running that puts you straight back on the release candidate. Ignore it until you decide to move to Prisma 8 on purpose.

Moving to Prisma 8 instead

If you’re starting a new project and want Prisma 8, these are the replacements from Prisma’s migration page. I confirmed that the old names fail on 8.0.0-rc.20, but I haven’t built a project on Prisma 8, so treat this as a map, not tested steps:

Prisma 7 Prisma 8 (per Prisma’s docs)
prisma init prisma orm init --write-env
prisma generate prisma contract emit
prisma migrate dev prisma db update, or prisma migration plan then prisma db migrate
prisma db push prisma db init (empty database) or prisma db update
@prisma/client one package per database, e.g. @prisma/orm-postgres

What didn’t work

How this was tested

A fresh npm project on Windows 11 with Node 24.14.0, created with npm i -D prisma and npm i @prisma/client on October 7, 2026, which installed prisma 8.0.0-rc.20 and @prisma/client 7.10.0. Every Prisma 7 command above was run against that CLI, then again after the fix, against Postgres 17 in Docker. The CI case was a folder containing only prisma/schema.prisma and .env, with nothing installed, running npx -y prisma generate and then the version-pinned command from the Docker section. npm dist-tags can change at any time: when Prisma 8 reaches its final release, latest will point to it for good, and the fix above stays the way to keep a Prisma 7 app running.

The code for every case above is public, so you can run it yourself: prisma-init and prisma-ci in nk-repro.

— N.K., end of entry No.048

Useful? Pass it on:Post on XFollow @EmotionalMatter

Related entries

  1. No.049

    Fix: @prisma/client did not initialize yet (Prisma 6 and 7)

    The error says run prisma generate. Why it keeps coming back on Windows, npm 12 and CI, reproduced, plus the errors Prisma 7 throws instead.

    > D:\project\node_modules\.prisma\client\default.js:43

    DATABASE4 min
  2. No.042

    Fix: "Could not locate the bindings file" in sqlite3

    sqlite3 or better-sqlite3 installed fine, then can't find its .node file. Four causes reproduced, how the Tried: paths tell them apart, and the fix for each.

    > Error: Could not locate the bindings file. Tried:

    FIXED3 min
  3. No.039

    npm 12 breaking changes, tested: what actually breaks

    The headline change, install scripts blocked by default, broke puppeteer, cypress, sqlite3 and Claude Code's npm package, and silently skipped lefthook's git hooks. esbuild, bcrypt, sharp and better-sqlite3 kept working. Every install reported success, and the only sign was a warning after the summary.

    TESTED5 min

Post card · Newsletter

Get the next fix in your inbox.

One short email when a new entry is published. No spam, never shared, and you can leave any time.

— Nilay

or follow by RSSor on X

By subscribing you agree to the privacy note. One click to leave.

tip: paste the exact error text