Skip to content
All findings

`npm i prisma@latest` installs Prisma 8.0.0-rc.36 in a Prisma 7.10 app: 'prisma generate is a Prisma 7 command and is not available in Prisma 8', and 6 more breaks (SQLite)

Published 1 Dec 2026

npm's latest tag for the prisma CLI is the Prisma 8 RC (8.0.0-rc.36), but @prisma/client latest is still 7.10.1. Upgrading a Prisma 7.10.1 SQLite app with prisma@latest gives a v8 CLI next to a v7 client: generate, migrate dev/deploy, db push, studio and postinstall all exit 2 with CLI.V7_COMMAND. The suggested @prisma/prisma7 fallback fails until prisma.config.ts imports @prisma/prisma7/config. SQLite schemas can't be adopted by orm init. Fix: npm i -D prisma@prev.

Since 2026-08-25 npm's latest tag for the prisma CLI points at the Prisma 8 release candidates (8.0.0-rc.36 today; 7.10.1 is tagged prev). But @prisma/client@latest is still 7.10.1. So npm i -D prisma@latest, or npm i prisma in a new project, gives you a Prisma 8 CLI beside a Prisma 7 client, and every Prisma 7 command exits with code 2. Fix: npm i -D prisma@prev (resolves to 7.10.1 and saves ^7.10.1).

log
✘ [CLI.V7_COMMAND] `prisma generate` is a Prisma 7 command and is not available in Prisma 8  why: Prisma 8 has no client generation step. `contract emit` reads your schema and writes contract.json and contract.d.ts, [...] To keep using Prisma 7, install its CLI with `npm install --save-dev @prisma/prisma7@7` and run `prisma7 generate`.

Environment: Docker node:24 (Node v24.21.0), with the npm registry as of 2026-12-01. The starting point was a working Prisma 7.10.1 app: SQLite through @prisma/adapter-better-sqlite3, the prisma-client generator, three related models, one migration, and typical queries (nested create, findMany, groupBy, $transaction([...]), a P2002 check). (The Prisma 6→7 hop is in /p/upgrading-a-prisma-6-sqlite-app-to-prisma-7-10-the-datasource-property-url-is-no.) Reproduced 2026-12-01.

1. prisma@latest gives a v8 CLI next to a v7 client

I upgraded with npm i -D prisma@latest and npm i @prisma/client@latest @prisma/adapter-better-sqlite3@latest, then ran npm ls:

log
+-- @prisma/adapter-better-sqlite3@7.10.1+-- @prisma/client@7.10.1`-- prisma@8.0.0-rc.36

There is no @prisma/client 8. Prisma 8 apps install @prisma/orm-sqlite or @prisma/orm-postgres instead. A plain npm install/npm ci from the lockfile stayed on 7.10.1. According to prisma/orm#31110, Prisma 7.10.1's update notice prints exactly these two @latest installs. The fix (#31111) landed on the v7 branch after 7.10.1 shipped. I didn't see the notice in my runs.

2. Every Prisma 7 command fails with CLI.V7_COMMAND (Prisma 8.0.0-rc.36)

generate, migrate dev, migrate deploy, db push and studio all print CLI.V7_COMMAND and exit 2. studio has no Prisma 8 replacement. prisma -v now means --verbose, so npx prisma -v prints No command registered for -v. Use prisma --version.

The app keeps running as long as an old src/generated/prisma folder exists. On a fresh clone or in CI it fails with ERR_MODULE_NOT_FOUND: Cannot find module '.../generated/prisma/client.js'. And a "postinstall": "prisma generate" script makes npm ci itself fail with npm error code 2.

3. The suggested `@prisma/prisma7` fallback fails: `(0 , _config2.env) is not a function`

Every error recommends npm install --save-dev @prisma/prisma7@7 and prisma7 <command>. With a standard Prisma 7 prisma.config.ts, that fails:

log
$ npx prisma7 generateFailed to load config file "/app" as a TypeScript/JavaScript module. Error: TypeError: (0 , _config2.env) is not a function

The cause is that import { defineConfig, env } from "prisma/config" now resolves to Prisma 8's prisma/config, which only exports definePrismaConfig. The fix is to import from the wrapper instead:

ts
import { defineConfig, env } from "@prisma/prisma7/config";

After that, prisma7 generate, prisma7 migrate status and the app all worked on 7.10.1.

4. `orm init --from-prisma7-schema` hits the same config error, then refuses SQLite (Prisma 8.0.0-rc.36)

The docs' upgrade command (written for PostgreSQL), run with --target sqlite: npx prisma orm init --from-prisma7-schema prisma/schema.prisma --target sqlite --confirm <name>. It first failed with CLI.INIT_PRISMA7_CONFIG_UNREADABLE (same env error). After I renamed the file to prisma7.config.ts as it advised, it failed again:

log
✘ [CLI.INIT_PRISMA7_SOURCE_UNAVAILABLE] sqlite cannot keep a Prisma 7 schema  why: sqlite is not one of the target packages in Prisma's list (postgres, mongodb), [...] Nothing was changed.

On SQLite you start a new contract: --target @prisma/orm-sqlite (--target sqlite is read as the npm package sqlite, giving CLI.INIT_TARGET_PACKAGE_NOT_VERIFIED). My three Prisma 7 models pasted into contract.prisma unchanged and emitted. db init created the tables. I didn't test pointing Prisma 8 at the existing Prisma 7 database or its prisma/migrations folder.

5. Prisma 8 RC: the client API is a rewrite, and P2002 checks fail silently

The scaffolded client is db.orm.User, not prisma.user. db.user.findMany() throws TypeError: Cannot read properties of undefined (reading 'findMany'). Queries are chained: .where({...}).first(), .all(), and orderBy takes a callback. orderBy({ priority: "desc" }) throws TypeError: selector is not a function, but orderBy(t => t.priority.desc()) works.

A duplicate email gives SqlQueryError with sqlState: "23505" and code: undefined. Prisma 7-style if (e.code === "P2002") checks are now silently false.

6. Prisma 8.0.0-rc.36: bare `prisma init` writes agent skill files

npx prisma init now adds "postinstall": "prisma skills sync || exit 0" and writes SKILL.md files into .claude/, .cursor/, .agents/ and .devin/. It doesn't scaffold a schema (that's prisma orm init). --datasource-provider fails with CLI.V7_FLAG.

How to detect

npm ls prisma @prisma/client: different majors mean you're affected. Also check whether npx prisma --version prints 8.0.0-rc.*.

Final working setup (stay on Prisma 7)

bash
npm i -D prisma@prev        # 7.10.1, saved as ^7.10.1npx prisma generate && npx prisma migrate status && npm start   # all OK

Or keep v8 installed and use @prisma/prisma7 with the config import from section 3.

Sources

Connected posts