diff --git a/apps/docs/content/docs/(index)/full-stack-tutorial.mdx b/apps/docs/content/docs/(index)/full-stack-tutorial.mdx index 2b644f36907..822057b5e24 100644 --- a/apps/docs/content/docs/(index)/full-stack-tutorial.mdx +++ b/apps/docs/content/docs/(index)/full-stack-tutorial.mdx @@ -14,8 +14,8 @@ It uses the `hono` template so you get a small API you can verify with curl at e ## Prerequisites -- Node.js 22.18 or newer (on the 24 line, 24.11 or newer; 24 recommended), or Bun -- npm 11.6.0 or newer, if you use npm. Node.js 22 comes with npm 10, so run `npm install --global npm@11` first; the [create-prisma prerequisites](/prisma-orm/create-prisma#prerequisites) explain why +- Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended), or Bun +- If you use npm, the npm that ships with your Node.js release (npm 10 on Node.js 22) - A [Prisma Data Platform account](https://pris.ly/pdp) for the deploy step, free to create, with no credit card needed on the [Free plan](#what-the-free-plan-includes) - No database needed: local runs provision a local Prisma Postgres, and deploys provision a real one, both from your Composer declaration @@ -75,7 +75,7 @@ The prompt uses npm and Node.js. On Bun, replace `npm create prisma@latest --` w ```text Create a new Hono API composed with Prisma Composer and Prisma ORM, run it locally, and deploy it to Prisma Compute. -Check the versions first: `node --version` must print 22.18 or newer (on the 24 line, 24.11 or newer). If you use npm, `npm --version` must print 11.6.0 or newer; Node.js 22 comes with npm 10, so if npm is older, run `npm install --global npm@11` before step 1. +Check the Node.js version first: `node --version` must print 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer. The npm that ships with your Node.js release works; on Node.js 22 that is npm 10. 1. Scaffold: `npm create prisma@latest -- my-app --template hono --provider postgres --yes`. Then run `npx prisma@latest init` in `my-app` to confirm the Prisma agent skills the scaffold installed are current, and use them. 2. Read `module.ts` and `service.ts` first: the Composer module provisions the database and the service, and it is what `dev` and `deploy` operate on. diff --git a/apps/docs/content/docs/(index)/getting-started.mdx b/apps/docs/content/docs/(index)/getting-started.mdx index e5b1e3c6ed1..2d44695d1aa 100644 --- a/apps/docs/content/docs/(index)/getting-started.mdx +++ b/apps/docs/content/docs/(index)/getting-started.mdx @@ -12,8 +12,8 @@ Coming from an earlier version? [Coming from Prisma ORM 7](/orm/coming-from-pris ## Prerequisites -- **Node.js 22.18 or newer; on the 24 line, 24.11 or newer.** Check with `node --version`. Node.js 24 is recommended. -- **npm 11.6.0 or newer, if you start a new project with npm.** Check with `npm --version`. Node.js 22 comes with npm 10, and `npm create prisma@latest` stops on npm 10 before it writes any files, so update npm first with `npm install --global npm@11`. pnpm, Bun, and Yarn 2 or newer are also supported. The [create-prisma prerequisites](/prisma-orm/create-prisma#prerequisites) have the details. +- **Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer.** Check with `node --version`. Node.js 24 is recommended. +- **A package manager.** The npm that ships with your Node.js release works; on Node.js 22 that is npm 10. pnpm, Bun, and Yarn 4.10 or newer are also supported. ## Start a new project @@ -70,7 +70,7 @@ Create a new [framework] application with Prisma ORM, seed it, and run it locall If I have not told you which framework, stop and ask before scaffolding. Valid --template values: minimal (the default), next, hono, nuxt, astro, nest, svelte, tanstack-start, elysia. -Check the versions first: `node --version` must print 22.18 or newer (on the 24 line, 24.11 or newer). If you use npm, `npm --version` must print 11.6.0 or newer; Node.js 22 comes with npm 10, so if npm is older, run `npm install --global npm@11` before step 1. +Check the Node.js version first: `node --version` must print 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer. The npm that ships with your Node.js release works; on Node.js 22 that is npm 10. 1. Scaffold the app: `npm create prisma@latest -- my-app --template [framework] --provider postgres --yes`. 2. Get a database connection string: use the one I give you, or create a Prisma Postgres database with `npx create-db@latest` and show me the claim URL it prints. Export it as `DATABASE_URL` in the shell; the generated scripts read the environment variable, not `.env`. diff --git a/apps/docs/content/docs/(index)/index.mdx b/apps/docs/content/docs/(index)/index.mdx index 0a9d5657972..f994d123bcf 100644 --- a/apps/docs/content/docs/(index)/index.mdx +++ b/apps/docs/content/docs/(index)/index.mdx @@ -119,7 +119,7 @@ Create a new [framework] application with Prisma ORM against my existing Postgre If I have not given you a connection string, stop and ask; do not invent one. Valid --template values: minimal (the default), next, hono, nuxt, astro, nest, svelte, tanstack-start, elysia. -Check the versions first: `node --version` must print 22.18 or newer (on the 24 line, 24.11 or newer). If you use npm, `npm --version` must print 11.6.0 or newer; Node.js 22 comes with npm 10, so if npm is older, run `npm install --global npm@11` before step 1. +Check the Node.js version first: `node --version` must print 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer. The npm that ships with your Node.js release works; on Node.js 22 that is npm 10. 1. Scaffold: `npm create prisma@latest -- my-app --template [framework] --provider postgres --yes`. 2. Export my connection string as `DATABASE_URL` in the shell; the generated scripts read the environment variable, not `.env`. From the project directory: `npm run db:init`, then start `npm run dev` in the background and verify the sample query returns data. Sample users are seeded automatically on the app's first query; there is no separate seed script. diff --git a/apps/docs/content/docs/(index)/prisma-compute/deploy.mdx b/apps/docs/content/docs/(index)/prisma-compute/deploy.mdx index 6cf530b6b58..7888f8f5cc0 100644 --- a/apps/docs/content/docs/(index)/prisma-compute/deploy.mdx +++ b/apps/docs/content/docs/(index)/prisma-compute/deploy.mdx @@ -19,7 +19,7 @@ Both paths meet in the same [deploy step](#2-deploy), because Composer treats ev Before you start, make sure you have: -- **Node.js 22.18 or newer.** Composer hands your TypeScript entry file straight to Node, and running `.ts` files directly needs 22.18.0 or later. On older versions, Composer commands stop at `ERR_UNKNOWN_FILE_EXTENSION`. +- **Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer.** Composer hands your TypeScript entry file straight to Node, and running `.ts` files directly needs 22.18.0 or later. On older versions, Composer commands stop at `ERR_UNKNOWN_FILE_EXTENSION`. - **[Bun](https://bun.sh).** Prisma Compute runs deployed apps on Bun, so your server code targets it, and `bun build` produces the self-contained entry file a deploy needs. - **A [Prisma Data Platform account](https://pris.ly/pdp)**, free to create. You only need it for the deploy step; [local development](/local-development) runs without an account. @@ -248,7 +248,7 @@ Build [what you want] as a Prisma Composer app and deploy it to Prisma Compute u Notes: - After installing @prisma/composer, install its agent skill so you use the real API: `npx prisma skills sync` (the skill ships inside the package; run `npx prisma skills list` to confirm). - Before deploying, run `npx prisma auth whoami`; if I am not signed in, stop and ask me to run `npx prisma auth login` (it opens a browser). -- Composer needs Node.js 22.18 or newer, and server code targets Bun. Read the port with `service.port()` and bind 0.0.0.0. For a Next.js service, use the nextjs build adapter and set `output: "standalone"`. +- Composer needs Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer, and server code targets Bun. Read the port with `service.port()` and bind 0.0.0.0. For a Next.js service, use the nextjs build adapter and set `output: "standalone"`. - Composer does not build; produce one self-contained entry file per service (for example `bun build --target=bun`), then run it locally with `npx prisma dev module.ts` and verify each service's local URL responds. - Deploy with `npx prisma deploy module.ts` and verify the printed public URL with curl. - To give a service a database, declare `deps: { db: rawPostgres() }` (imported from @prisma/composer-prisma-cloud) and build the client from the injected `db.url`; do not read connection strings from process.env. For a database typed by Prisma ORM, use `postgres(contract)` from @prisma/composer-prisma-cloud/orm instead. diff --git a/apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/mongodb.mdx b/apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/mongodb.mdx index 3d1d9d11272..b565dc4e000 100644 --- a/apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/mongodb.mdx +++ b/apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/mongodb.mdx @@ -10,7 +10,7 @@ This page uses MongoDB. [Use PostgreSQL instead](/prisma-orm/add-to-existing-pro On this page you add Prisma ORM to an app whose MongoDB database already has collections. You run `orm init`, write a contract that describes your collections, and run two queries. The contract is the file that holds your models. In earlier Prisma ORM versions, it was `schema.prisma`. -Your app must reach its MongoDB database and run on Node.js 22.18 or newer. A single `mongod` server is enough. You need a replica set only for transactions and change streams, and MongoDB Atlas already runs one. +Your app must reach its MongoDB database and run on Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer. A single `mongod` server is enough. You need a replica set only for transactions and change streams, and MongoDB Atlas already runs one. If your database has no collections yet, follow [Add Prisma ORM and MongoDB to an existing app](/prisma-orm/quickstart/existing-app/mongodb) instead, which creates the collections for you. If you want Prisma ORM to create a new app for you, follow [Create a new app with MongoDB](/prisma-orm/quickstart/mongodb). diff --git a/apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/postgresql.mdx b/apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/postgresql.mdx index 493588c0fed..c4d9e93c628 100644 --- a/apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/postgresql.mdx +++ b/apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/postgresql.mdx @@ -10,7 +10,7 @@ This page uses PostgreSQL. [Use MongoDB instead](/prisma-orm/add-to-existing-pro On this page you add Prisma ORM to an app whose PostgreSQL database already has tables. You run `orm init`, generate the contract from your tables, run two queries, and apply your first change to the tables. The contract is the file that holds your models. In Prisma ORM 7, it was `schema.prisma`. -Your app must reach its PostgreSQL database and run on Node.js 22.18 or newer. Work against a development copy of your database, not production. [Step 9](#9-make-your-first-change-to-the-tables) shows how to apply your changes to production afterwards. +Your app must reach its PostgreSQL database and run on Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer. Work against a development copy of your database, not production. [Step 9](#9-make-your-first-change-to-the-tables) shows how to apply your changes to production afterwards. If your database has no tables yet, follow [Add Prisma ORM and PostgreSQL to an existing app](/prisma-orm/quickstart/existing-app/postgresql) instead, which creates the tables for you. If you want Prisma ORM to create a new app for you, follow [Create a new app with PostgreSQL](/prisma-orm/quickstart/postgresql). If your app uses Prisma ORM 7 today, follow [Prisma ORM 7 to 8 (PostgreSQL)](/guides/upgrade-prisma-orm/postgresql). diff --git a/apps/docs/content/docs/(index)/prisma-orm/create-prisma.mdx b/apps/docs/content/docs/(index)/prisma-orm/create-prisma.mdx index e97d08840c4..968c0d0c9b1 100644 --- a/apps/docs/content/docs/(index)/prisma-orm/create-prisma.mdx +++ b/apps/docs/content/docs/(index)/prisma-orm/create-prisma.mdx @@ -18,24 +18,10 @@ Use it when you want to start from a working app. If you already have an app, fo ## Prerequisites -Check both versions before you run the command, because `create-prisma` stops when either one is too old: +- **Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer.** Check with `node --version`. Node.js 24 is recommended. +- **A package manager.** The npm that ships with your Node.js release works; on Node.js 22 that is npm 10. pnpm, Bun, and Yarn 4.10 or newer are also supported. -- **Node.js 22.18 or newer; on the 24 line, 24.11 or newer.** Check with `node --version`. Node.js 24 is recommended. -- **npm 11.6.0 or newer, if you install with npm.** Check with `npm --version`. Every Node.js 22 release comes with npm 10, so on Node.js 22 you have to update npm yourself. Node.js 24.11 and newer already come with a new enough npm. - -To update npm: - -```bash -npm install --global npm@11 -``` - -Older npm releases can crash while they install the Prisma packages. For that reason `create-prisma` checks the npm version before it writes any files, and on an older npm it stops with this message: - -```text -Create command failed: npm 10.9.9 is unsupported. Required: npm 11.6.0 or newer. Older npm releases can crash while resolving Prisma dependencies. Run npm install --global npm@11, then retry create-prisma. -``` - -The npm requirement applies only when npm installs the project. pnpm, Bun, and Yarn 2 or newer are also supported, but Yarn 1 is not. +On any other Node.js version, `create-prisma` stops before it writes any files and prints the required range. It skips this check when you run it with Bun or Deno. ## Create a project @@ -91,7 +77,7 @@ npm create prisma@latest -- my-app --template next --provider postgres --yes | `nest` | NestJS | | `svelte` | SvelteKit | | `astro` | Astro | -| `nuxt` | Nuxt | +| `nuxt` | Nuxt (needs Node.js 22.22.3 or newer on the 22 line, 24.15 or newer on the 24 line, or 26 or newer) | | `tanstack-start` | TanStack Start | Every template supports PostgreSQL and MongoDB, PSL or TypeScript contract authoring, and npm, pnpm, Yarn, and Bun. Each [framework guide](/guides) walks the generated app from the first query to a deploy. diff --git a/apps/docs/content/docs/(index)/prisma-orm/from-scratch.mdx b/apps/docs/content/docs/(index)/prisma-orm/from-scratch.mdx index 75eeb196ef8..0393c9efec5 100644 --- a/apps/docs/content/docs/(index)/prisma-orm/from-scratch.mdx +++ b/apps/docs/content/docs/(index)/prisma-orm/from-scratch.mdx @@ -22,7 +22,7 @@ Two commands have new names in Prisma ORM 8. `contract emit` does what `prisma g ## Prerequisites -- Node.js 22.18 or newer. +- Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended). - A connection string for an empty PostgreSQL database. Step 4 creates the tables and step 5 clears the `User` table on every run, so do not point this page at a database that holds data you need. Any PostgreSQL URL works. If you don't have one, `npx create-db@latest` creates a temporary Prisma Postgres database and prints its connection string, plus a claim URL if you want to keep it. ## 1. Create the project diff --git a/apps/docs/content/docs/(index)/prisma-orm/index.mdx b/apps/docs/content/docs/(index)/prisma-orm/index.mdx index 23d088d4a91..b35b1aaaa92 100644 --- a/apps/docs/content/docs/(index)/prisma-orm/index.mdx +++ b/apps/docs/content/docs/(index)/prisma-orm/index.mdx @@ -106,7 +106,7 @@ Create a new [framework] application with Prisma ORM, seed it, and run it locall If I have not told you which framework, stop and ask before scaffolding. Valid --template values: minimal (the default), next, hono, nuxt, astro, nest, svelte, tanstack-start, elysia. -Check the versions first: `node --version` must print 22.18 or newer (on the 24 line, 24.11 or newer). If you use npm, `npm --version` must print 11.6.0 or newer; Node.js 22 comes with npm 10, so if npm is older, run `npm install --global npm@11` before step 1. +Check the Node.js version first: `node --version` must print 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer. The npm that ships with your Node.js release works; on Node.js 22 that is npm 10. 1. Scaffold the app: `npm create prisma@latest -- my-app --template [framework] --provider postgres --yes`. Then run `npx prisma@latest init` in the project directory so the Prisma agent skills are installed and stay current, and use them. 2. Get a database connection string: use the one I give you, or create a Prisma Postgres database in the project the app will deploy to: check `npx prisma auth whoami` (if I am not signed in, stop and ask me to run `npx prisma auth login`), then `npx prisma project create my-app` and `npx prisma postgres create mydb`, which prints the connection string once. Export it as `DATABASE_URL` in the shell; the generated scripts read the environment variable. diff --git a/apps/docs/content/docs/(index)/prisma-orm/quickstart/existing-app/mongodb.mdx b/apps/docs/content/docs/(index)/prisma-orm/quickstart/existing-app/mongodb.mdx index cdd883d1b82..6fe2480d574 100644 --- a/apps/docs/content/docs/(index)/prisma-orm/quickstart/existing-app/mongodb.mdx +++ b/apps/docs/content/docs/(index)/prisma-orm/quickstart/existing-app/mongodb.mdx @@ -20,7 +20,7 @@ For what release candidate means, when the final release is expected, and how to ## Prerequisites -- A project directory with a `package.json`, on Node.js 22.18 or newer. +- A project directory with a `package.json`, on Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended). - A way to run a TypeScript file. This page uses `tsx`. If your project does not have it, run `npm install --save-dev tsx typescript`. - An empty MongoDB database, version 8.0 or newer. A single `mongod` server is enough. You need a replica set only for transactions and change streams. diff --git a/apps/docs/content/docs/(index)/prisma-orm/quickstart/existing-app/postgresql.mdx b/apps/docs/content/docs/(index)/prisma-orm/quickstart/existing-app/postgresql.mdx index a5309b3f29d..3084f4d96ef 100644 --- a/apps/docs/content/docs/(index)/prisma-orm/quickstart/existing-app/postgresql.mdx +++ b/apps/docs/content/docs/(index)/prisma-orm/quickstart/existing-app/postgresql.mdx @@ -20,7 +20,7 @@ For what release candidate means, when the final release is expected, and how to ## Prerequisites -- A project directory with a `package.json`, on Node.js 22.18 or newer. +- A project directory with a `package.json`, on Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended). - A way to run a TypeScript file. This page uses `tsx`. If your project does not have it, run `npm install --save-dev tsx typescript`. - An empty PostgreSQL database, version 15 or newer. Step 2 shows how to get one if you have none. diff --git a/apps/docs/content/docs/(index)/prisma-orm/quickstart/mongodb.mdx b/apps/docs/content/docs/(index)/prisma-orm/quickstart/mongodb.mdx index b3e140a5a5b..5c131391e9b 100644 --- a/apps/docs/content/docs/(index)/prisma-orm/quickstart/mongodb.mdx +++ b/apps/docs/content/docs/(index)/prisma-orm/quickstart/mongodb.mdx @@ -20,7 +20,7 @@ For what release candidate means, when the final release is expected, and how to ## Quick start -You need Node.js 22.18 or newer (on the 24 line, 24.11 or newer); Node.js 24 is recommended. If you use npm, you also need npm 11.6.0 or newer: Node.js 22 comes with npm 10, so run `npm install --global npm@11` first. The [create-prisma prerequisites](/prisma-orm/create-prisma#prerequisites) explain why. +You need Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer; Node.js 24 is recommended. The npm that ships with your Node.js release works; on Node.js 22 that is npm 10. ```npm npm create prisma@latest -- --provider mongodb --no-deploy diff --git a/apps/docs/content/docs/(index)/prisma-orm/quickstart/postgresql.mdx b/apps/docs/content/docs/(index)/prisma-orm/quickstart/postgresql.mdx index 227f0b0f714..dc2d3135e66 100644 --- a/apps/docs/content/docs/(index)/prisma-orm/quickstart/postgresql.mdx +++ b/apps/docs/content/docs/(index)/prisma-orm/quickstart/postgresql.mdx @@ -20,7 +20,7 @@ For what release candidate means, when the final release is expected, and how to ## Quick start -You need Node.js 22.18 or newer (on the 24 line, 24.11 or newer); Node.js 24 is recommended. If you use npm, you also need npm 11.6.0 or newer: Node.js 22 comes with npm 10, so run `npm install --global npm@11` first. The [create-prisma prerequisites](/prisma-orm/create-prisma#prerequisites) explain why. +You need Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer; Node.js 24 is recommended. The npm that ships with your Node.js release works; on Node.js 22 that is npm 10. ```npm npm create prisma@latest -- --provider postgres --no-deploy diff --git a/apps/docs/content/docs/(index)/prisma-postgres/from-the-cli.mdx b/apps/docs/content/docs/(index)/prisma-postgres/from-the-cli.mdx index 30e36640bdc..dc14f4345ab 100644 --- a/apps/docs/content/docs/(index)/prisma-postgres/from-the-cli.mdx +++ b/apps/docs/content/docs/(index)/prisma-postgres/from-the-cli.mdx @@ -10,7 +10,7 @@ Use the CLI when you want Prisma ORM and Prisma Postgres set up without leaving ## Start a new app -You need Node.js 22.18 or newer (on the 24 line, 24.11 or newer); Node.js 24 is recommended. If you use npm, you also need npm 11.6.0 or newer: Node.js 22 comes with npm 10, so run `npm install --global npm@11` first. The [create-prisma prerequisites](/prisma-orm/create-prisma#prerequisites) explain why. +You need Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer; Node.js 24 is recommended. The npm that ships with your Node.js release works; on Node.js 22 that is npm 10. ```npm npm create prisma@latest diff --git a/apps/docs/content/docs/(index)/prisma-postgres/import-from-existing-database-mysql.mdx b/apps/docs/content/docs/(index)/prisma-postgres/import-from-existing-database-mysql.mdx index ffcc055caa0..da6eea2230d 100644 --- a/apps/docs/content/docs/(index)/prisma-postgres/import-from-existing-database-mysql.mdx +++ b/apps/docs/content/docs/(index)/prisma-postgres/import-from-existing-database-mysql.mdx @@ -15,7 +15,7 @@ You need: - the connection URL for the MySQL database you are importing from - a Prisma Data Platform account - `pgloader` -- Node.js 24 or newer +- Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended) ## 1. Create a Prisma Postgres database diff --git a/apps/docs/content/docs/(index)/prisma-postgres/quickstart/prisma-orm.mdx b/apps/docs/content/docs/(index)/prisma-postgres/quickstart/prisma-orm.mdx index caa15e05476..4b51dfe1d74 100644 --- a/apps/docs/content/docs/(index)/prisma-postgres/quickstart/prisma-orm.mdx +++ b/apps/docs/content/docs/(index)/prisma-postgres/quickstart/prisma-orm.mdx @@ -10,7 +10,7 @@ Create a Prisma ORM app backed by Prisma Postgres. ## Quick start -You need Node.js 22.18 or newer (on the 24 line, 24.11 or newer); Node.js 24 is recommended. If you use npm, you also need npm 11.6.0 or newer: Node.js 22 comes with npm 10, so run `npm install --global npm@11` first. The [create-prisma prerequisites](/prisma-orm/create-prisma#prerequisites) explain why. +You need Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer; Node.js 24 is recommended. The npm that ships with your Node.js release works; on Node.js 22 that is npm 10. ```npm npm create prisma@latest diff --git a/apps/docs/content/docs/cli/contract-emit.mdx b/apps/docs/content/docs/cli/contract-emit.mdx index e9cce6d654e..305e66fadc3 100644 --- a/apps/docs/content/docs/cli/contract-emit.mdx +++ b/apps/docs/content/docs/cli/contract-emit.mdx @@ -50,7 +50,7 @@ node data-type-in-contract.ts npx prisma db sign --db "$DATABASE_URL" ``` -The script needs Node 24 or later. It rewrites every contract, snapshot, migration, ref, `migration.ts`, and `contract.d.ts` in the project, and every storage hash changes once. Until a database is signed, `db migrate` refuses with `MIGRATION.MARKER_MISMATCH`. Commit your work before you run it, so you can review its changes. +The script runs on any Node.js version Prisma ORM supports: 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer. It rewrites every contract, snapshot, migration, ref, `migration.ts`, and `contract.d.ts` in the project, and every storage hash changes once. Until a database is signed, `db migrate` refuses with `MIGRATION.MARKER_MISMATCH`. Commit your work before you run it, so you can review its changes. When the contract source cannot be read, the command fails with `CONTRACT.SOURCE_LOAD_FAILED` and prints each finding, meaning each problem it found in the source, with the file and line where it knows them. In `--json` output, the findings are the entries of the `envelope.diagnostics` array in the final `result` event, next to `envelope.error`. Each entry has a `code`, a `summary`, and, where known, `where.path` and `where.line`. If an entry's `code` is `CONTRACT.SOURCE_DIAGNOSTIC`, the code of the specific problem, such as `PSL_NO_OPTED_IN_SCHEMA_FILES`, is in its `meta.code`. diff --git a/apps/docs/content/docs/composer/getting-started.mdx b/apps/docs/content/docs/composer/getting-started.mdx index b72d3df73d2..5b7bbf8cd68 100644 --- a/apps/docs/content/docs/composer/getting-started.mdx +++ b/apps/docs/content/docs/composer/getting-started.mdx @@ -24,7 +24,7 @@ npx prisma@latest init ## Prerequisites -- **Node.js 22.18 or newer.** Check with `node --version`. Composer hands your TypeScript entry file straight to Node. Node runs `.ts` files directly only from 22.18.0, the release that turns type stripping on by default. On any older version, including 22.17, Composer commands stop at `ERR_UNKNOWN_FILE_EXTENSION` naming your own entry file. +- **Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer.** Check with `node --version`. Composer hands your TypeScript entry file straight to Node. Node runs `.ts` files directly only from 22.18.0, the release that turns type stripping on by default. On any older version, including 22.17, Composer commands stop at `ERR_UNKNOWN_FILE_EXTENSION` naming your own entry file. - **[Bun](https://bun.sh).** Prisma Compute runs Bun, so the server code targets it (`Bun.serve`). This guide also uses `bun build` to produce the built output. - **npm, pnpm, or Bun.** Bun workspaces need two extra direct dependencies; see the note in step 1. diff --git a/apps/docs/content/docs/composer/limitations.mdx b/apps/docs/content/docs/composer/limitations.mdx index 474fb7c3440..c36ad8d331c 100644 --- a/apps/docs/content/docs/composer/limitations.mdx +++ b/apps/docs/content/docs/composer/limitations.mdx @@ -22,7 +22,7 @@ Prisma Composer is in [Early Access](/console/more/feature-maturity#early-access ## Platforms - **Windows is not supported yet** for local development (`dev`). -- **Node.js 22.18 or newer is required.** Composer hands your TypeScript entry file straight to Node, and earlier versions cannot run `.ts` files directly. +- **Composer needs Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer.** Composer hands your TypeScript entry file straight to Node, and earlier versions cannot run `.ts` files directly. ## Runtime behavior to design around diff --git a/apps/docs/content/docs/compute/getting-started.mdx b/apps/docs/content/docs/compute/getting-started.mdx index cd6c4e3fa3d..8c7253beddb 100644 --- a/apps/docs/content/docs/compute/getting-started.mdx +++ b/apps/docs/content/docs/compute/getting-started.mdx @@ -16,7 +16,7 @@ This guide uses the Prisma CLI, run as `npx prisma `. Deployments come ## Prerequisites -- A JavaScript runtime. The commands below run with `npx` or `pnpm` on Node.js 22.18 or newer, or with `bunx` (Bun). +- A JavaScript runtime. The commands below run with `npx` or `pnpm` on Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer, or with `bunx` (Bun). - A [Prisma Data Platform account](https://pris.ly/pdp). - A [Prisma Composer](/composer) app. [Deploy your first app](/prisma-compute/deploy) shows how to declare a new app or one you already have. To deploy on push, the app also needs a GitHub repository you can connect. diff --git a/apps/docs/content/docs/compute/limitations.mdx b/apps/docs/content/docs/compute/limitations.mdx index 758a15bced3..139cb04e5eb 100644 --- a/apps/docs/content/docs/compute/limitations.mdx +++ b/apps/docs/content/docs/compute/limitations.mdx @@ -10,7 +10,7 @@ This page lists what Prisma Compute can and can't do. ## CLI -- The quickest way to run the CLI is `npx prisma ` (or `bunx`/`pnpm dlx`), with Node.js 22.18 or newer. +- The quickest way to run the CLI is `npx prisma ` (or `bunx`/`pnpm dlx`), with Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer. - The platform command groups are `auth`, `project` (including `project env`), `postgres`, `bucket`, `branch`, `git`, `service` (including `service version` and `service domain`), and `agent`, plus the root-level [`dev`](/cli/dev) and [`deploy`](/cli/deploy) verbs for Composer apps. The same binary also carries the [Prisma ORM data commands](/cli) (`contract`, `db`, `migration`). There is no `compute` namespace: Compute is managed through the resource groups above. - Commands are targeted by parameters, not ambient state: the subject resource is the first positional argument, and there is no interactive picker. A missing target fails with a structured error (exit 2) before any network call. - There is no committed compute config file. A Composer app describes itself, including each service's build, in its module. `.prisma/local.json` is gitignored and only stores your local link to the workspace and project. In CI, pass `--project` and the service name on each command; the CLI does not read a project or service from the environment. diff --git a/apps/docs/content/docs/guides/database/data-migration.mdx b/apps/docs/content/docs/guides/database/data-migration.mdx index d5b0e0239ee..ffdeae5a3c9 100644 --- a/apps/docs/content/docs/guides/database/data-migration.mdx +++ b/apps/docs/content/docs/guides/database/data-migration.mdx @@ -21,7 +21,7 @@ Prisma ORM 8 is the current release. Prisma ORM 7 remains fully supported; the P ## Prerequisites -- [Node.js](https://nodejs.org) 24 or later +- [Node.js](https://nodejs.org) 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended) - A PostgreSQL connection string for a development database, and one for the database you deploy to - Git, for the branch-per-migration workflow @@ -101,7 +101,7 @@ App space ✔ Advanced ref "db" → e8804d8e27d8737475c7be0c538afd9665907df8b82c605bd5cd50926dd73fde ``` -Seed a few posts so the migration has data to move. Node.js 24 runs TypeScript directly: +Seed a few posts so the migration has data to move. Node.js runs TypeScript directly: ```typescript title="src/seed.ts" import { db } from "./prisma/db.ts"; diff --git a/apps/docs/content/docs/guides/database/multiple-databases.mdx b/apps/docs/content/docs/guides/database/multiple-databases.mdx index e29ed248f71..89194aac0fe 100644 --- a/apps/docs/content/docs/guides/database/multiple-databases.mdx +++ b/apps/docs/content/docs/guides/database/multiple-databases.mdx @@ -21,7 +21,7 @@ Prisma ORM 8 is the current release. Prisma ORM 7 remains fully supported; the P ## Prerequisites -- [Node.js](https://nodejs.org) 24 or later +- [Node.js](https://nodejs.org) 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended) - Two PostgreSQL connection strings, or nothing at all: `npx create-db@latest` can create a [Prisma Postgres](/postgres) database for you, run it twice for two - A [Vercel](https://vercel.com/) account if you want to deploy at the end @@ -294,7 +294,7 @@ npx prisma db verify --config ./prisma.users.config.ts --db "$POSTS_DATABASE_URL ### 5.1. Seed both databases -Create a script that writes through both clients. Node.js 24 runs TypeScript directly, so no extra tooling is needed: +Create a script that writes through both clients. Node.js runs TypeScript directly, so no extra tooling is needed: ```typescript title="prisma/seed.ts" import { usersDb } from "./users/db.ts"; diff --git a/apps/docs/content/docs/guides/database/schema-changes.mdx b/apps/docs/content/docs/guides/database/schema-changes.mdx index 84c1afd508e..d8b1893a349 100644 --- a/apps/docs/content/docs/guides/database/schema-changes.mdx +++ b/apps/docs/content/docs/guides/database/schema-changes.mdx @@ -21,7 +21,7 @@ Prisma ORM 8 is the current release. Prisma ORM 7 remains fully supported; the P ## Prerequisites -- [Node.js](https://nodejs.org) 24 or later +- [Node.js](https://nodejs.org) 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended) - A Prisma ORM project with a contract and at least one migration ([Create a new app with PostgreSQL](/prisma-orm/quickstart/postgresql) gives you one) - A PostgreSQL database per developer, reachable as `DATABASE_URL` - Basic familiarity with Git branches and merges diff --git a/apps/docs/content/docs/guides/deployment/bun-workspaces.mdx b/apps/docs/content/docs/guides/deployment/bun-workspaces.mdx index 9fcd8c0a725..31318a4a302 100644 --- a/apps/docs/content/docs/guides/deployment/bun-workspaces.mdx +++ b/apps/docs/content/docs/guides/deployment/bun-workspaces.mdx @@ -22,7 +22,7 @@ Prisma ORM 8 is the current release. Prisma ORM 7 remains fully supported; the P ## Prerequisites - [Bun](https://bun.sh/docs/installation) 1.1 or later (`bun --version`) -- [Node.js](https://nodejs.org) 24 or later: Bun runs the scripts, and Next.js runs on Node.js +- [Node.js](https://nodejs.org) 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended): Bun runs the scripts, and Next.js runs on Node.js - A PostgreSQL connection string, or nothing at all: `bunx create-db@latest` can create a [Prisma Postgres](/postgres) database for you ## Use with your agent diff --git a/apps/docs/content/docs/guides/deployment/cloudflare-workers.mdx b/apps/docs/content/docs/guides/deployment/cloudflare-workers.mdx index 420b94769e8..48c0cc5da99 100644 --- a/apps/docs/content/docs/guides/deployment/cloudflare-workers.mdx +++ b/apps/docs/content/docs/guides/deployment/cloudflare-workers.mdx @@ -23,7 +23,7 @@ Prisma ORM 8 is the current release. Prisma ORM 7 remains fully supported; the P ## Prerequisites -- [Node.js](https://nodejs.org) 24 or later +- [Node.js](https://nodejs.org) 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended) - A [Cloudflare account](https://dash.cloudflare.com/sign-up/workers-and-pages) for the deploy step - A PostgreSQL connection string, or nothing at all: `npx create-db@latest` can create a [Prisma Postgres](/postgres) database for you diff --git a/apps/docs/content/docs/guides/deployment/docker.mdx b/apps/docs/content/docs/guides/deployment/docker.mdx index 04b1363afef..07757580f0b 100644 --- a/apps/docs/content/docs/guides/deployment/docker.mdx +++ b/apps/docs/content/docs/guides/deployment/docker.mdx @@ -24,7 +24,7 @@ Prisma ORM 8 is the current release. Prisma ORM 7 remains fully supported; the P ## Prerequisites - [Docker](https://docs.docker.com/) and [Docker Compose](https://docs.docker.com/compose/) installed -- [Node.js](https://nodejs.org) 24 or later +- [Node.js](https://nodejs.org) 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended) Before starting, make sure no PostgreSQL service is running locally and that ports `5432` (PostgreSQL), `3000` (application server), and `5555` (Prisma Studio) are free. @@ -142,7 +142,7 @@ The warning at the top matters: `npm init -y` writes `"type": "commonjs"`, and t } ``` -There is no `prisma generate` and no `postinstall` hook to add. Node.js 24 runs `src/index.ts` directly, so the `start` script needs no build step either. +There is no `prisma generate` and no `postinstall` hook to add. Node.js runs `src/index.ts` directly, so the `start` script needs no build step either. ### 1.3. Define the data model diff --git a/apps/docs/content/docs/guides/deployment/pnpm-workspaces.mdx b/apps/docs/content/docs/guides/deployment/pnpm-workspaces.mdx index e4b90779c36..5cedf2a75e9 100644 --- a/apps/docs/content/docs/guides/deployment/pnpm-workspaces.mdx +++ b/apps/docs/content/docs/guides/deployment/pnpm-workspaces.mdx @@ -21,7 +21,7 @@ Prisma 8 is the current release of Prisma ORM. Prisma 7 remains fully supported; ## Prerequisites -- [Node.js](https://nodejs.org) 24 or later +- [Node.js](https://nodejs.org) 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended) - [pnpm](https://pnpm.io/installation) 10.26 or later, but not 12.0 to 12.4.0, which have a defect that breaks step 2.1 (this guide uses pnpm 12.7.0) - A PostgreSQL connection string, or nothing at all: `npx create-db@latest` can create a [Prisma Postgres](/postgres) database for you @@ -177,7 +177,7 @@ Create the package entry point that apps will import: export { db } from "./prisma/db"; ``` -Add a seed script so the app has rows to render. Node.js 24 runs TypeScript directly, but it needs the `.ts` extension on relative imports, so this file names it: +Add a seed script so the app has rows to render. Node.js runs TypeScript directly, but it needs the `.ts` extension on relative imports, so this file names it: ```typescript title="packages/database/src/seed.ts" import { db } from "./prisma/db.ts"; diff --git a/apps/docs/content/docs/guides/deployment/turborepo.mdx b/apps/docs/content/docs/guides/deployment/turborepo.mdx index 8bf8701e007..b00863d5d8e 100644 --- a/apps/docs/content/docs/guides/deployment/turborepo.mdx +++ b/apps/docs/content/docs/guides/deployment/turborepo.mdx @@ -21,7 +21,7 @@ Prisma 8 is the current release of Prisma ORM. Prisma 7 remains fully supported; ## Prerequisites -- [Node.js](https://nodejs.org) 24 or later +- [Node.js](https://nodejs.org) 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended) - [pnpm](https://pnpm.io) (this guide uses pnpm; the Turborepo scaffold also supports npm, yarn, and Bun) - A PostgreSQL connection string, or nothing at all: `npx create-db@latest` can create a [Prisma Postgres](/postgres) database for you diff --git a/apps/docs/content/docs/guides/frameworks/astro.mdx b/apps/docs/content/docs/guides/frameworks/astro.mdx index 6b503ac98f1..9d0d9911453 100644 --- a/apps/docs/content/docs/guides/frameworks/astro.mdx +++ b/apps/docs/content/docs/guides/frameworks/astro.mdx @@ -24,7 +24,7 @@ Answer the prompts, then export `DATABASE_URL` in your shell before running the ## Prerequisites -- [Node.js](https://nodejs.org) 22.18 or newer (on the 24 line, 24.11 or newer; 24 recommended) +- [Node.js](https://nodejs.org) 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended) - A PostgreSQL connection string, or nothing at all: `npx create-db@latest` can create a Prisma Postgres database for you ## 1. Scaffold and enter the project diff --git a/apps/docs/content/docs/guides/frameworks/hono.mdx b/apps/docs/content/docs/guides/frameworks/hono.mdx index 5d0129f6149..e831713cec2 100644 --- a/apps/docs/content/docs/guides/frameworks/hono.mdx +++ b/apps/docs/content/docs/guides/frameworks/hono.mdx @@ -14,7 +14,7 @@ Every command, route, and response below was run end to end against a live Prism ## Prerequisites -- [Node.js](https://nodejs.org) 22.18 or newer (on the 24 line, 24.11 or newer; 24 recommended), or [Bun](https://bun.sh/) (this guide uses Bun for speed; npm works the same) +- [Node.js](https://nodejs.org) 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended), or [Bun](https://bun.sh/) (this guide uses Bun for speed; npm works the same) - A PostgreSQL connection string, or nothing at all: the scaffold can create a [Prisma Postgres](/postgres) database for you ## 1. Scaffold the project diff --git a/apps/docs/content/docs/guides/frameworks/nestjs.mdx b/apps/docs/content/docs/guides/frameworks/nestjs.mdx index 025d25f5203..e61ab5e9be1 100644 --- a/apps/docs/content/docs/guides/frameworks/nestjs.mdx +++ b/apps/docs/content/docs/guides/frameworks/nestjs.mdx @@ -14,7 +14,7 @@ Every command below was run end to end against a live [Prisma Postgres](/postgre ## Prerequisites -- [Node.js](https://nodejs.org) 22.18 or newer (on the 24 line, 24.11 or newer; 24 recommended) +- [Node.js](https://nodejs.org) 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended) - A PostgreSQL connection string, or nothing at all: `npx create-db@latest` can create a Prisma Postgres database for you ## 1. Scaffold and enter the project diff --git a/apps/docs/content/docs/guides/frameworks/nextjs.mdx b/apps/docs/content/docs/guides/frameworks/nextjs.mdx index b7312b2ffa3..32e2b902c1f 100644 --- a/apps/docs/content/docs/guides/frameworks/nextjs.mdx +++ b/apps/docs/content/docs/guides/frameworks/nextjs.mdx @@ -14,7 +14,7 @@ Every command below was run end to end against a live [Prisma Postgres](/postgre ## Prerequisites -- [Node.js](https://nodejs.org) 22.18 or newer (on the 24 line, 24.11 or newer; 24 recommended) +- [Node.js](https://nodejs.org) 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended) - A PostgreSQL connection string, or nothing at all: `npx create-db@latest` can create a Prisma Postgres database for you ## 1. Scaffold and enter the project diff --git a/apps/docs/content/docs/guides/frameworks/nuxt.mdx b/apps/docs/content/docs/guides/frameworks/nuxt.mdx index 1d912a08504..c9ff72ca283 100644 --- a/apps/docs/content/docs/guides/frameworks/nuxt.mdx +++ b/apps/docs/content/docs/guides/frameworks/nuxt.mdx @@ -24,7 +24,7 @@ Answer the prompts, then export `DATABASE_URL` in your shell before running the ## Prerequisites -- [Node.js](https://nodejs.org) 22.18 or newer (on the 24 line, 24.11 or newer; 24 recommended) +- [Node.js](https://nodejs.org) 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended). The Nuxt template needs Node.js 22.22.3 or newer on the 22 line, 24.15 or newer on the 24 line, or 26 or newer, because Nuxt itself requires it - A PostgreSQL connection string, or nothing at all: `npx create-db@latest` can create a Prisma Postgres database for you ## 1. Scaffold and enter the project diff --git a/apps/docs/content/docs/guides/frameworks/react-router-7.mdx b/apps/docs/content/docs/guides/frameworks/react-router-7.mdx index baeffc07cd9..67f8689639c 100644 --- a/apps/docs/content/docs/guides/frameworks/react-router-7.mdx +++ b/apps/docs/content/docs/guides/frameworks/react-router-7.mdx @@ -22,7 +22,7 @@ Prisma ORM 8 is the current release. Prisma ORM 7 remains fully supported; the P ## Prerequisites -- [Node.js](https://nodejs.org) 24 or later +- [Node.js](https://nodejs.org) 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended) - A PostgreSQL connection string, or nothing at all: `npx create-db@latest` can create a [Prisma Postgres](/postgres) database for you ## 1. Set up your project @@ -157,7 +157,7 @@ The five operations are the `user` and `post` tables, the unique constraint on ` ### 2.5. Seed the database -The seed is a plain script that Node.js 24 runs directly, so it imports the client with its `.ts` extension. Tell TypeScript to allow that: +The seed is a plain script that Node.js runs directly, so it imports the client with its `.ts` extension. Tell TypeScript to allow that: ```json title="tsconfig.json" { diff --git a/apps/docs/content/docs/guides/frameworks/solid-start.mdx b/apps/docs/content/docs/guides/frameworks/solid-start.mdx index 665db9da358..9d3348b1d14 100644 --- a/apps/docs/content/docs/guides/frameworks/solid-start.mdx +++ b/apps/docs/content/docs/guides/frameworks/solid-start.mdx @@ -23,7 +23,7 @@ Prisma ORM 8 is the current release. Prisma ORM 7 remains fully supported; the P ## Prerequisites -- [Node.js](https://nodejs.org) 24 or later (the SolidStart 2 template requires it) +- [Node.js](https://nodejs.org) 24.11 or newer on the 24 line, or 26 or newer (the SolidStart 2 template needs Node.js 24) - A PostgreSQL connection string, or nothing at all: `npx create-db@latest` can create a [Prisma Postgres](/postgres) database for you ## 1. Scaffold the SolidStart project diff --git a/apps/docs/content/docs/guides/frameworks/sveltekit.mdx b/apps/docs/content/docs/guides/frameworks/sveltekit.mdx index 84b21563cbd..33e62e927f5 100644 --- a/apps/docs/content/docs/guides/frameworks/sveltekit.mdx +++ b/apps/docs/content/docs/guides/frameworks/sveltekit.mdx @@ -24,7 +24,7 @@ Answer the prompts, then export `DATABASE_URL` in your shell before running the ## Prerequisites -- [Node.js](https://nodejs.org) 22.18 or newer (on the 24 line, 24.11 or newer; 24 recommended) +- [Node.js](https://nodejs.org) 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended) - A PostgreSQL connection string, or nothing at all: `npx create-db@latest` can create a Prisma Postgres database for you ## 1. Scaffold and enter the project diff --git a/apps/docs/content/docs/guides/frameworks/tanstack-start.mdx b/apps/docs/content/docs/guides/frameworks/tanstack-start.mdx index b0beddbbaa3..e0d701b3796 100644 --- a/apps/docs/content/docs/guides/frameworks/tanstack-start.mdx +++ b/apps/docs/content/docs/guides/frameworks/tanstack-start.mdx @@ -24,7 +24,7 @@ Answer the prompts, then export `DATABASE_URL` in your shell before running the ## Prerequisites -- [Node.js](https://nodejs.org) 22.18 or newer (on the 24 line, 24.11 or newer; 24 recommended) +- [Node.js](https://nodejs.org) 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended) - A PostgreSQL connection string, or nothing at all: `npx create-db@latest` can create a Prisma Postgres database for you ## 1. Scaffold and enter the project diff --git a/apps/docs/content/docs/guides/integrations/ai-sdk.mdx b/apps/docs/content/docs/guides/integrations/ai-sdk.mdx index 38d85741a6b..6be4183b0dc 100644 --- a/apps/docs/content/docs/guides/integrations/ai-sdk.mdx +++ b/apps/docs/content/docs/guides/integrations/ai-sdk.mdx @@ -21,7 +21,7 @@ Prisma ORM 8 is the current release. Prisma ORM 7 remains fully supported; the P ## Prerequisites -- [Node.js](https://nodejs.org) 24 or later +- [Node.js](https://nodejs.org) 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended) - An [OpenAI API key](https://platform.openai.com/api-keys) - A PostgreSQL connection string, or nothing at all: `npx create-db@latest` can create a [Prisma Postgres](/postgres) database for you diff --git a/apps/docs/content/docs/guides/integrations/github-actions.mdx b/apps/docs/content/docs/guides/integrations/github-actions.mdx index 98246134a52..19fbc13f848 100644 --- a/apps/docs/content/docs/guides/integrations/github-actions.mdx +++ b/apps/docs/content/docs/guides/integrations/github-actions.mdx @@ -25,7 +25,7 @@ Prisma ORM 8 is the current release. Prisma ORM 7 remains fully supported; the P ## Prerequisites -- [Node.js](https://nodejs.org) 24 or later +- [Node.js](https://nodejs.org) 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended) - A [Prisma Data Platform](https://console.prisma.io?utm_source=actions_guide&utm_medium=docs) account - A GitHub repository - `jq`, to read the CLI's JSON output (GitHub-hosted runners have it preinstalled) @@ -247,7 +247,7 @@ Add a script for it: } ``` -Node.js 24 runs the TypeScript file directly. Run it: +Node.js runs the TypeScript file directly. Run it: ```npm npm run seed diff --git a/apps/docs/content/docs/guides/making-guides.mdx b/apps/docs/content/docs/guides/making-guides.mdx index 43908fae7d5..78949dda849 100644 --- a/apps/docs/content/docs/guides/making-guides.mdx +++ b/apps/docs/content/docs/guides/making-guides.mdx @@ -51,7 +51,7 @@ metaDescription: '[One sentence for search results]' ### Required sections 1. **Introduction** (`## Introduction`): what the guide builds, in two or three sentences, followed by the `Using Prisma ORM 7?` note (see [Versioning](#versioning-the-prisma-7-twin)). -2. **Prerequisites** (`## Prerequisites`): Node.js 24 or later, a database connection string or `npx create-db@latest`, and any accounts the guide needs. Keep it to what is truly necessary. +2. **Prerequisites** (`## Prerequisites`): Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended), a database connection string or `npx create-db@latest`, and any accounts the guide needs. Keep it to what is truly necessary. 3. **Numbered steps** (`## 1. Scaffold the project`, `## 2. Initialize the database`, and so on): each step is one bounded action with its command, its real output in a `no-copy` block, and one or two sentences on what happened. 4. **Common gotchas** (`## Common gotchas`): the failures you hit while validating, with the verbatim error text and the fix. 5. **Use with your agent** (`## Use with your agent`): this section comes after the steps, so a reader sees the instructions for a person first. It has three parts, in this order. First, an `` block with a numbered prompt a coding agent can follow to complete the guide. Reference the guide's own `.md` URL (`https://www.prisma.io/docs/guides/[category]/[slug].md`) so the agent can read it. Second, a pointer to `npx prisma@latest init` for the [Prisma ORM skills](/ai/tools/skills). Third, two or three follow-up prompts that map to the guide. @@ -231,7 +231,7 @@ Prisma ORM 8 is the current release. Prisma ORM 7 remains fully supported; the P ## Prerequisites -- [Node.js](https://nodejs.org) 24 or later +- [Node.js](https://nodejs.org) 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended) - A PostgreSQL connection string, or nothing at all: `npx create-db@latest` creates a [Prisma Postgres](/postgres) database for you ## 1. Set up the project diff --git a/apps/docs/content/docs/guides/switch-to-prisma-orm/from-drizzle.mdx b/apps/docs/content/docs/guides/switch-to-prisma-orm/from-drizzle.mdx index 47b8f942c00..9192c130935 100644 --- a/apps/docs/content/docs/guides/switch-to-prisma-orm/from-drizzle.mdx +++ b/apps/docs/content/docs/guides/switch-to-prisma-orm/from-drizzle.mdx @@ -23,7 +23,7 @@ Prisma ORM 8 is the current release. Prisma ORM 7 remains fully supported; the P ## Prerequisites -- [Node.js](https://nodejs.org) 24 or later +- [Node.js](https://nodejs.org) 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended) - A Drizzle project that talks to a PostgreSQL database, and its connection string in `DATABASE_URL` - Basic familiarity with Drizzle and Next.js diff --git a/apps/docs/content/docs/guides/switch-to-prisma-orm/from-mongoose.mdx b/apps/docs/content/docs/guides/switch-to-prisma-orm/from-mongoose.mdx index e7eeda6562a..fca6c9e18b3 100644 --- a/apps/docs/content/docs/guides/switch-to-prisma-orm/from-mongoose.mdx +++ b/apps/docs/content/docs/guides/switch-to-prisma-orm/from-mongoose.mdx @@ -22,7 +22,7 @@ Prisma ORM 8 is the current release. Prisma ORM 7 remains fully supported but ha ## Prerequisites - A Mongoose project you want to migrate (this guide uses TypeScript and Express) -- [Node.js](https://nodejs.org) 24 or later +- [Node.js](https://nodejs.org) 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended) - A MongoDB replica set. MongoDB Atlas is one already; locally, start `mongod` with `--replSet rs0` and run `rs.initiate()` once - Basic familiarity with Mongoose diff --git a/apps/docs/content/docs/guides/switch-to-prisma-orm/from-sql-orms.mdx b/apps/docs/content/docs/guides/switch-to-prisma-orm/from-sql-orms.mdx index c5a8ba80abd..3161ec21027 100644 --- a/apps/docs/content/docs/guides/switch-to-prisma-orm/from-sql-orms.mdx +++ b/apps/docs/content/docs/guides/switch-to-prisma-orm/from-sql-orms.mdx @@ -20,7 +20,7 @@ Prisma ORM 8 is the current release. Prisma ORM 7 remains fully supported; the P ## Prerequisites -- [Node.js](https://nodejs.org) 24 or later +- [Node.js](https://nodejs.org) 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (24 recommended) - A Sequelize or TypeORM project that already connects to a PostgreSQL database - A TypeScript project. The scripts in this guide are written for an app that runs as ES modules, and steps 2 and 5 say what to change in a CommonJS app @@ -312,7 +312,7 @@ console.log("totals", totals); await db.close(); ``` -Run it with Node.js 24, which executes TypeScript directly: +Run it with Node.js, which executes TypeScript directly: ```bash node src/prisma-queries.ts diff --git a/apps/docs/content/docs/guides/upgrade-prisma-orm/mongodb.mdx b/apps/docs/content/docs/guides/upgrade-prisma-orm/mongodb.mdx index 6cfcdff431a..44161f21929 100644 --- a/apps/docs/content/docs/guides/upgrade-prisma-orm/mongodb.mdx +++ b/apps/docs/content/docs/guides/upgrade-prisma-orm/mongodb.mdx @@ -16,7 +16,7 @@ Install the companion [prisma-mongodb-upgrade](https://github.com/prisma/skills/ ## Prerequisites -- **Node.js 22.18 or newer (on the 24 line, 24.11 or newer)**; Node.js 24 recommended +- **Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer**; Node.js 24 recommended - **TypeScript 5.9+** - **MongoDB 8.0+** - **The mongodb node driver 7.x** as a peer dependency diff --git a/apps/docs/content/docs/guides/upgrade-prisma-orm/postgresql.mdx b/apps/docs/content/docs/guides/upgrade-prisma-orm/postgresql.mdx index d0197cd15df..f8dd2a3c98d 100644 --- a/apps/docs/content/docs/guides/upgrade-prisma-orm/postgresql.mdx +++ b/apps/docs/content/docs/guides/upgrade-prisma-orm/postgresql.mdx @@ -34,7 +34,7 @@ The [prisma8-and-7-example](https://github.com/prisma/prisma8-and-7-example) rep ## Prerequisites -- **Node.js 22.18 or newer (on the 24 line, 24.11 or newer)**; Node.js 24 recommended +- **Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer**; Node.js 24 recommended - A working **Prisma ORM 7** application on PostgreSQL: `prisma.config.ts`, the `prisma-client` generator, and a driver adapter - **TypeScript 5.9 or newer** with `"strict": true`. [Step 2.6](#26-set-up-tsconfigjson-for-the-prisma-orm-8-client) tells you whether to change the `module` setting in `tsconfig.json` diff --git a/apps/docs/content/docs/orm/migrations/editing-a-migration.mdx b/apps/docs/content/docs/orm/migrations/editing-a-migration.mdx index b5da3a418ea..e110de9d2d6 100644 --- a/apps/docs/content/docs/orm/migrations/editing-a-migration.mdx +++ b/apps/docs/content/docs/orm/migrations/editing-a-migration.mdx @@ -18,7 +18,7 @@ node migrations/app/20260707T1008_add_display_name/migration.ts Wrote ops.json + migration.json to /path/to/my-app/migrations/app/20260707T1008_add_display_name ``` -You can run the file like this because the Prisma ORM CLI already needs Node.js 22.18 or later, and those versions run `migration.ts` directly, with no build step. Run it from your project root: if you change into the migration directory first and run it from there, the command fails with an error whose `code` is `CONFIG.FILE_NOT_FOUND`. +You can run the file like this because the Prisma ORM CLI already needs Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer, and all of those run `migration.ts` directly, with no build step. Run it from your project root: if you change into the migration directory first and run it from there, the command fails with an error whose `code` is `CONFIG.FILE_NOT_FOUND`. The other file recompiling rewrites, `migration.json`, is what makes a hand-edit detectable. It records the contract state the migration starts `from`, the state it ends at, `to`, and a hash of the migration. `npx prisma migration check` recomputes that hash from `ops.json` and `migration.json` and compares it with the stored one, so any change to either file that did not come from a recompile no longer matches. The check never reads `migration.ts`, which is why an edit you make there counts for nothing until you recompile. diff --git a/apps/docs/content/docs/orm/migrations/how-migrations-work.mdx b/apps/docs/content/docs/orm/migrations/how-migrations-work.mdx index 22952fcbb42..539d3b84a26 100644 --- a/apps/docs/content/docs/orm/migrations/how-migrations-work.mdx +++ b/apps/docs/content/docs/orm/migrations/how-migrations-work.mdx @@ -16,7 +16,7 @@ You run this loop many times a day: 1. **Change your contract**: edit `contract.prisma`, then run `npx prisma contract emit`. 2. **Plan a migration**: `migration plan` works out what has to change in the database by comparing your new contract with an earlier contract state, and writes what it finds as a migration directory under `migrations/app/`. A contract state is one version of your contract, named by its hash, so it is how Prisma ORM refers to your contract as it stood at a particular moment. Unless you tell it otherwise, the earlier state it compares against is the `db` ref, the file `migrations/app/refs/db.json` naming the contract state you last applied in development. -3. **Review it**: before anything touches the database, run `npx prisma migration show ` to see the operations and SQL that `db migrate` will run. If you want the migration to change rows as well, [edit `migration.ts` and recompile it](/orm/migrations/editing-a-migration) by running `node migrations/app//migration.ts` from your project root, which rewrites `ops.json`. Nothing extra is needed to run that file, because the Prisma ORM CLI already requires Node.js 22.18 or later, which runs `migration.ts` directly. +3. **Review it**: before anything touches the database, run `npx prisma migration show ` to see the operations and SQL that `db migrate` will run. If you want the migration to change rows as well, [edit `migration.ts` and recompile it](/orm/migrations/editing-a-migration) by running `node migrations/app//migration.ts` from your project root, which rewrites `ops.json`. Nothing extra is needed to run that file, because the Prisma ORM CLI already requires Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer, and all of those run `migration.ts` directly. 4. **Apply it**: `db migrate` starts by reading the database's marker, the record in the database of which contract state it matches, so it knows how much of your history the database has already seen, and then runs the migrations from that state to your current contract. In development, add [`--advance-ref db`](/orm/migrations/generating-a-migration#the-db-ref-skipping---from) so the next `migration plan` starts from what you just applied. This example uses the contract from [Generating a migration](/orm/migrations/generating-a-migration#your-first-migration), whose `User` model is stored in the table `user` because it sets `@@map("user")`. Its first migration is already applied, with `npx prisma db migrate --advance-ref db`, and a database connection is set up as in [Create a new app with PostgreSQL](/prisma-orm/quickstart/postgresql). Add an optional `phone String?` field to `User`, then run: diff --git a/apps/docs/content/docs/orm/reference/migration-api.mdx b/apps/docs/content/docs/orm/reference/migration-api.mdx index 3d6a14a94c8..e8b46430570 100644 --- a/apps/docs/content/docs/orm/reference/migration-api.mdx +++ b/apps/docs/content/docs/orm/reference/migration-api.mdx @@ -63,7 +63,7 @@ The four imports at the top point at snapshots, which are copies of your contrac A first migration starts from an empty database, so it has no start snapshot. `migration plan` writes it as `extends Migration`, without the two `Start` imports and without `startContractJson`. -Running the file turns `operations` into `ops.json`, and also writes `migration.json`, which records the start and end contracts. Node.js 22.18 or later runs the `.ts` file directly, with no build step. Run it from your project root: it reads `prisma.config.ts` from the directory you run it in, to learn which database and extensions the project uses, and it never connects to a database. +Running the file turns `operations` into `ops.json`, and also writes `migration.json`, which records the start and end contracts. Every Node.js version Prisma ORM supports (22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer) runs the `.ts` file directly, with no build step. Run it from your project root: it reads `prisma.config.ts` from the directory you run it in, to learn which database and extensions the project uses, and it never connects to a database. ```bash node migrations/app/20260921T1408_add_user_bio/migration.ts diff --git a/apps/docs/content/docs/orm/release-status.mdx b/apps/docs/content/docs/orm/release-status.mdx index f5db3863aa0..f8d59aa250b 100644 --- a/apps/docs/content/docs/orm/release-status.mdx +++ b/apps/docs/content/docs/orm/release-status.mdx @@ -8,7 +8,7 @@ metaDescription: 'Prisma ORM 8 is a release candidate, with general availability Prisma ORM 8 is a **release candidate**: you can install it and build with it today. Until the final release, some details of the API may still change, so code you write now may need small edits later. Each release candidate fixes bugs found in the previous one. -It needs Node.js 22.18 or newer and TypeScript 5.9 or newer. +It needs Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer, and TypeScript 5.9 or newer. The npm that ships with each of those Node.js releases works, including npm 10 on Node.js 22. Before you decide, read [what is not available yet](/orm/coming-from-prisma-orm-7#not-available-yet). Today that includes `$extends`, filtering inside JSON columns, atomic `increment`, most nested writes, transaction isolation levels, and the `P2002`-style error codes.