diff --git a/apps/docs/content/docs/(index)/full-stack-tutorial.mdx b/apps/docs/content/docs/(index)/full-stack-tutorial.mdx index a216d51717..b35e89b5ef 100644 --- a/apps/docs/content/docs/(index)/full-stack-tutorial.mdx +++ b/apps/docs/content/docs/(index)/full-stack-tutorial.mdx @@ -14,7 +14,7 @@ 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 +- Node.js 22.22 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 - 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 @@ -74,7 +74,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 versions first: `node --version` must print 22.22 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. 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 e5b1e3c6ed..eb86a3c349 100644 --- a/apps/docs/content/docs/(index)/getting-started.mdx +++ b/apps/docs/content/docs/(index)/getting-started.mdx @@ -12,8 +12,9 @@ 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. +- **Prisma ORM: Node.js 22.18 or newer.** Check with `node --version`. Node.js 24 is recommended. +- **Creating a new app with `create-prisma`: Node.js 22.22 or newer; on the 24 line, 24.11 or newer.** This is the scaffolding tool's requirement, not Prisma ORM's minimum. See the [create-prisma prerequisites](/prisma-orm/create-prisma#prerequisites). +- **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 4.10 or newer are also supported. The [create-prisma prerequisites](/prisma-orm/create-prisma#prerequisites) have the details. ## Start a new project @@ -70,7 +71,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 versions first: `node --version` must print 22.22 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. 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 d75eb7d857..71f7fbf2a4 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 versions first: `node --version` must print 22.22 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. 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-orm/create-prisma.mdx b/apps/docs/content/docs/(index)/prisma-orm/create-prisma.mdx index e97d08840c..b4e71d14ff 100644 --- a/apps/docs/content/docs/(index)/prisma-orm/create-prisma.mdx +++ b/apps/docs/content/docs/(index)/prisma-orm/create-prisma.mdx @@ -20,7 +20,9 @@ Use it when you want to start from a working app. If you already have an app, fo 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 24 line, 24.11 or newer.** Check with `node --version`. Node.js 24 is recommended. +These are `create-prisma`'s requirements. Prisma ORM itself supports Node.js 22.18 or newer; see [release status](/orm/release-status). + +- **Node.js 22.22 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: @@ -35,7 +37,9 @@ Older npm releases can crash while they install the Prisma packages. For that re 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. +The npm requirement applies only when npm installs the project. pnpm, Bun, and Yarn 4.10 or newer are also supported. + +Some framework templates require a newer Node.js version. The Nuxt template requires Node.js 22.22.3 or newer on the 22 line, 24.15 or newer on the 24 line, or 26 or newer. Check the generated `package.json` for the template's `engines` field. ## Create a project @@ -85,6 +89,7 @@ npm create prisma@latest -- my-app --template next --provider postgres --yes | `--template` | App | | --- | --- | | `minimal` | A minimal server with one query | +| `turborepo` | A Hello World server and shared Prisma package in a Turborepo workspace | | `next` | Next.js | | `hono` | Hono | | `elysia` | Elysia | @@ -106,7 +111,7 @@ Deno 2.9 skips packages published in the previous 24 hours by default, so withou ## Start the app -Set the connection string in your environment, then initialize the database and start the dev server. The generated `prisma.config.ts` reads `DATABASE_URL` for PostgreSQL and `MONGODB_URL` for MongoDB from the process environment and loads no dotenv file (Deno projects are the exception: their scripts pass `--env-file=.env`), so export the variable in the shell before running the scripts. +Set the connection string in your environment, then initialize the database and start the dev server. The generated `prisma.config.ts` reads `DATABASE_URL` for both PostgreSQL and MongoDB from the process environment and loads no dotenv file (Deno projects are the exception: their scripts pass `--env-file=.env`), so export the variable in the shell before running the scripts. ```bash cd my-app diff --git a/apps/docs/content/docs/(index)/prisma-orm/index.mdx b/apps/docs/content/docs/(index)/prisma-orm/index.mdx index 23d088d4a9..f230bdb26d 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 versions first: `node --version` must print 22.22 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. 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/mongodb.mdx b/apps/docs/content/docs/(index)/prisma-orm/quickstart/mongodb.mdx index b3e140a5a5..866f27a8a2 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.22 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. ```npm npm create prisma@latest -- --provider mongodb --no-deploy @@ -40,11 +40,10 @@ The scaffold writes a `.env` with a local replica-set connection string: DATABASE_URL="mongodb://localhost:27017/mydb?replicaSet=rs0&directConnection=true" ``` -The generated scripts read environment variables directly rather than `.env`, and the CLI and the app use different variable names: the CLI commands read `MONGODB_URL`, and the app reads `DATABASE_URL`. Export both in the shell you work in: +The generated scripts read `DATABASE_URL` directly from the environment rather than `.env`. Export it in the shell you work in: ```bash -export MONGODB_URL="mongodb://localhost:27017/mydb?replicaSet=rs0&directConnection=true" -export DATABASE_URL="$MONGODB_URL" +export DATABASE_URL="mongodb://localhost:27017/mydb?replicaSet=rs0&directConnection=true" ``` If you use MongoDB Atlas, use the connection string from your Atlas cluster instead. @@ -67,7 +66,7 @@ Apply the planned migration to MongoDB. npm run migrate ``` -The output ends with a summary like `Applied 3 operation(s) across 1 contract space`. If it fails with a connection error, confirm `MONGODB_URL` is exported in this shell and points at a running MongoDB deployment; if the string still names `replicaSet=rs0`, that replica set has to exist. +The output ends with a summary like `Applied 3 operation(s) across 1 contract space`. If it fails with a connection error, confirm `DATABASE_URL` is exported in this shell and points at a running MongoDB deployment; if the string still names `replicaSet=rs0`, that replica set has to exist. The `1 contract space` in the summary is the migration history for your own models. Prisma ORM calls it the `app` [contract space](/orm/migrations/the-migration-graph#terms-used-on-this-page), and its migrations are in `migrations/app/`. 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 227f0b0f71..ba85285705 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.22 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. ```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 30e36640bd..a28f0593e1 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.22 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. ```npm npm create prisma@latest 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 caa15e0547..0eab3f37a8 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.22 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. ```npm npm create prisma@latest diff --git a/apps/docs/content/docs/guides/frameworks/astro.mdx b/apps/docs/content/docs/guides/frameworks/astro.mdx index 6b503ac98f..3b3aa27b10 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.22 or newer (on the 24 line, 24.11 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 5d0129f614..4ad390b54d 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.22 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) - 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 025d25f520..3e604e18f7 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.22 or newer (on the 24 line, 24.11 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 b7312b2ffa..b2e68f523d 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.22 or newer (on the 24 line, 24.11 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 1d912a0850..c3f11ba5ba 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.22.3 or newer on the 22 line, 24.15 or newer on the 24 line, or 26 or newer - 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/sveltekit.mdx b/apps/docs/content/docs/guides/frameworks/sveltekit.mdx index 84b21563cb..869831fe9b 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.22 or newer (on the 24 line, 24.11 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 b0beddbbaa..fa99f1d15e 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.22 or newer (on the 24 line, 24.11 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