You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting started: validation-round fixes from live path testing
- First deploy does not auto-create a project (PROJECT_SETUP_REQUIRED):
agent prompts pass --create-project, prose now describes the picker
- db.close() does not exist; the API is db.runtime().close()
- Node floor is 24 (scaffold engines), not v20.19, across guides
- bun/deno scaffold commands were missing --template minimal
- Tutorial sample JSON gains the createdAt field the endpoint returns,
plus PORT and CLAIM_URL notes
- Stale template list on the compute deploy page; stale Post-model
prompt suggestions; scaffold flag-order consistency
- SEO: differentiate twin quickstart + v6 metas, product-focused ORM
metaDescription, /next meta as hands-on hub, self-contained
getting-started H1
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: apps/docs/content/docs/(index)/getting-started.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ If I have not told you which framework template to use, stop and ask.
59
59
1. Scaffold a new app non-interactively: `npx create-prisma@latest --name my-app --template [next|hono|nuxt|astro|nest|svelte|tanstack-start|elysia|turborepo] --provider postgresql --no-deploy`. Or add Prisma 7 to an existing app with `npx prisma@latest init --db`, which provisions a Prisma Postgres database; before that, check `npx @prisma/cli@latest auth whoami` and stop and ask me to run `auth login` if I am not signed in, because provisioning can open a browser.
60
60
2. From the project directory, define a small schema in `prisma/schema.prisma`, then run `npx prisma migrate dev --name init` and `npx prisma generate`. If migrate dev asks to reset the database, stop and ask me first.
61
61
3. Update the seed and app code to query the schema, and verify locally with the dev script.
62
-
4. Deploy with Prisma Compute: check `npx @prisma/cli@latest auth whoami` first. If I am not signed in, stop and ask me to run `npx @prisma/cli@latest auth login`, because that step opens a browser. Then run `npx @prisma/cli@latest app deploy --env .env` so DATABASE_URL reaches the deployment, and verify the deployed URL with curl.
62
+
4. Deploy with Prisma Compute: check `npx @prisma/cli@latest auth whoami` first. If I am not signed in, stop and ask me to run `npx @prisma/cli@latest auth login`, because that step opens a browser. Then run `npx @prisma/cli@latest app deploy --create-project my-app --env .env` so DATABASE_URL reaches the deployment, and verify the deployed URL with curl.
63
63
64
64
Current docs: https://www.prisma.io/docs/getting-started.md and https://www.prisma.io/docs/llms.txt.
Copy file name to clipboardExpand all lines: apps/docs/content/docs/(index)/index.mdx
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,8 +39,9 @@ npx create-prisma@next
39
39
cd my-app
40
40
npm run db:init
41
41
npm run db:seed
42
+
# db:seed failing? See the one-line fix: prisma.io/docs/next/full-stack-tutorial
42
43
npm run dev
43
-
# Deploy to a live URL (free account, browser sign-in)
44
+
# Deploy to a live URL (free account, browser sign-in) -- run after stopping dev
44
45
npx @prisma/cli@latest app deploy --env .env`}>
45
46
46
47
```text
@@ -52,7 +53,7 @@ If I have not told you which framework, stop and ask before scaffolding. Valid -
52
53
2. From the project directory, apply the starter contract and seed: `npm run db:init`, then `npm run db:seed`. If seeding fails with `Cannot read properties of undefined (reading 'where')`, change `db.orm.User` to `db.orm.public.User` in `src/prisma/seed.ts`, `src/prisma/users.ts`, and any route files that query `db.orm`, then rerun.
53
54
3. Edit the starter contract under `src/prisma/` into a small schema for my use case, then run `npm run contract:emit` and plan and apply the migration: `npx prisma-next migration plan`, then `npx prisma-next migrate --yes`. Migration planning diffs the emitted contract, so the emit step is required.
54
55
4. Update the seed script and the app routes to query the new schema, start `npm run dev` in the background, and verify with a request against the running app. For the `nest` template, if routes return 500s with `reading 'findAll'` in the logs, add explicit `@Inject()` tokens as shown in https://www.prisma.io/docs/guides/next/frameworks/nestjs.md.
55
-
5. Deploy with Prisma Compute. First apply the framework's deploy requirement from the guide at https://www.prisma.io/docs/guides/next/frameworks/[guide].md, where [guide] is the template name except: template `next` → guide `nextjs`, `nest` → `nestjs`, `svelte` → `sveltekit`. The requirements: Next.js needs `output: "standalone"` in `next.config.ts` (without it the deployed app returns 504s), TanStack Start needs the nitro build plugin, Astro needs the `@astrojs/node` adapter plus `--env HOST=0.0.0.0`, and Elysia needs `--framework bun --entry src/index.ts` on the deploy command. If the template is `svelte`, skip this step; Compute does not support SvelteKit yet. Check `npx @prisma/cli@latest auth whoami`. If I am not signed in, stop and ask me to run `npx @prisma/cli@latest auth login`, because that step opens a browser. Then run `npx @prisma/cli@latest app deploy --env .env` so DATABASE_URL reaches the deployment, and verify the deployed URL with curl.
56
+
5. Deploy with Prisma Compute. First apply the framework's deploy requirement from the guide at https://www.prisma.io/docs/guides/next/frameworks/[guide].md, where [guide] is the template name except: template `next` → guide `nextjs`, `nest` → `nestjs`, `svelte` → `sveltekit`. The requirements: Next.js needs `output: "standalone"` in `next.config.ts` (without it the deployed app returns 504s), TanStack Start needs the nitro build plugin, Astro needs the `@astrojs/node` adapter plus `--env HOST=0.0.0.0`, and Elysia needs `--framework bun --entry src/index.ts` on the deploy command. If the template is `svelte`, skip this step; Compute does not support SvelteKit yet. Check `npx @prisma/cli@latest auth whoami`. If I am not signed in, stop and ask me to run `npx @prisma/cli@latest auth login`, because that step opens a browser. Then run `npx @prisma/cli@latest app deploy --create-project my-app --env .env` so DATABASE_URL reaches the deployment, and verify the deployed URL with curl.
56
57
57
58
Use the installed Prisma Next skills and the current Prisma docs: https://www.prisma.io/docs/llms.txt (append `.md` to any docs URL for a markdown version).
58
59
```
@@ -166,7 +167,7 @@ Deploy this app to Prisma Compute using `npx @prisma/cli@latest`.
166
167
Compute supports Next.js (with `output: "standalone"` in its config), Nuxt, Astro, Hono, NestJS, TanStack Start, and plain Bun servers; for a Bun or Elysia server pass `--framework bun --entry <server file>`. If the app is none of these, stop and tell me.
167
168
168
169
1. Confirm I am signed in with `npx @prisma/cli@latest auth whoami`; if not, stop and ask me to run `npx @prisma/cli@latest auth login`.
169
-
2. Run `npx @prisma/cli@latest app deploy` from the project directory. If the app reads env vars from `.env` (like DATABASE_URL), add `--env .env`. Add `--db` only if it needs a brand-new database; Compute then provisions Prisma Postgres and wires the connection string.
170
+
2. Run `npx @prisma/cli@latest app deploy` from the project directory. If the app reads env vars from `.env` (like DATABASE_URL), add `--env .env`. If deploy fails with `PROJECT_SETUP_REQUIRED` (the directory is not pinned to a project yet), rerun with `--create-project <app-name>`, or `--project <id>` for an existing project. Add `--db` only if it needs a brand-new database; Compute then provisions Prisma Postgres and wires the connection string.
170
171
3. Fetch the deployed URL with curl and confirm the app responds. If it does not, read `npx @prisma/cli@latest app logs` briefly (it streams; stop it after reading).
171
172
172
173
Current docs: https://www.prisma.io/docs/prisma-compute/deploy.md.
Copy file name to clipboardExpand all lines: apps/docs/content/docs/(index)/next/full-stack-tutorial.mdx
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ Create a new Hono API with Prisma Next, seed it, and deploy it to Prisma Compute
29
29
1. Scaffold: `npx create-prisma@next create my-app --template hono --provider postgres --prisma-postgres --yes` (or pass `--database-url "<url>"` instead of `--prisma-postgres` if I give you a connection string).
30
30
2. In `my-app`, run `npm run db:init`, then `npm run db:seed`. If seeding fails with `Cannot read properties of undefined (reading 'where')`, change `db.orm.User` to `db.orm.public.User` in `src/prisma/seed.ts` and `src/prisma/users.ts`, then rerun.
31
31
3. Start `npm run dev` in the background and verify `curl http://localhost:3000/users` returns the seeded users.
32
-
4. Deploy: check `npx @prisma/cli@latest auth whoami`; if I am not signed in, stop and ask me to run `npx @prisma/cli@latest auth login`. Then run `npx @prisma/cli@latest app deploy --env .env` and verify the live URL's /users endpoint with curl.
32
+
4. Deploy: check `npx @prisma/cli@latest auth whoami`; if I am not signed in, stop and ask me to run `npx @prisma/cli@latest auth login`. Then run `npx @prisma/cli@latest app deploy --create-project my-app --env .env` and verify the live URL's /users endpoint with curl.
33
33
34
34
Use the installed Prisma Next skills.
35
35
```
@@ -50,7 +50,7 @@ Pick **Prisma Postgres** at the database prompt to have a database created for y
50
50
cd my-app
51
51
```
52
52
53
-
The scaffold writes `DATABASE_URL` to `.env`, generates a Hono server in `src/index.ts` with `GET /` and `GET /users` routes, puts the Prisma Next setup under `src/prisma/`, and installs [Prisma Next skills](/ai/tools/skills) for your coding agent.
53
+
The scaffold writes `DATABASE_URL` to `.env`, generates a Hono server in `src/index.ts` with `GET /` and `GET /users` routes, puts the Prisma Next setup under `src/prisma/`, and installs [Prisma Next skills](/ai/tools/skills) for your coding agent. If the database was provisioned without a signed-in CLI, `.env` also contains a `CLAIM_URL`; open it within 24 hours to claim the database into your account and keep it.
54
54
55
55
## 2. Initialize and seed the database
56
56
@@ -78,17 +78,17 @@ Seeing `Cannot read properties of undefined (reading 'where')`? The current temp
78
78
npm run dev
79
79
```
80
80
81
-
The server starts on port 3000. Confirm the API serves the seeded rows from Prisma Postgres:
81
+
The server starts on port 3000 (set `PORT` if something else is already using it). Confirm the API serves the seeded rows from Prisma Postgres:
@@ -102,7 +102,7 @@ Sign in once (it opens your browser):
102
102
npx @prisma/cli@latest auth login
103
103
```
104
104
105
-
Deploy from the project directory. The `--env .env` flag passes your `DATABASE_URL` to the deployment, so the live API talks to the same database:
105
+
Deploy from the project directory. The first deploy asks you to pick or create a project; pass `--create-project my-app` to skip the prompt (agents and CI need it, since there is no interactive picker). The `--env .env` flag passes your `DATABASE_URL` to the deployment, so the live API talks to the same database:
The same three users come back, now served from production next to your database. The first deploy creates a project, pins the directory to it in a gitignored `.prisma/local.json`, and promotes to production automatically.
127
+
The same three users come back, now served from production next to your database. The first deploy pins the directory to your project in a gitignored `.prisma/local.json` and promotes to production automatically.
Copy file name to clipboardExpand all lines: apps/docs/content/docs/(index)/next/index.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Introduction to Prisma Next
3
3
description: Prisma Next is the next major version of Prisma ORM, available in Early Access.
4
4
url: /next
5
5
metaTitle: Introduction to Prisma Next
6
-
metaDescription: Prisma Next is the next major version of Prisma ORM, available in Early Access.
6
+
metaDescription: Start here for Prisma Next, the Early Access rebuild of Prisma ORM. Quickstarts, framework guides, and agent prompts.
7
7
badge: early-access
8
8
hideSidebar: true
9
9
---
@@ -50,7 +50,7 @@ If I have not told you which framework, stop and ask before scaffolding. Valid -
50
50
2. From the project directory, apply the starter contract and seed: `npm run db:init`, then `npm run db:seed`. If seeding fails with `Cannot read properties of undefined (reading 'where')`, change `db.orm.User` to `db.orm.public.User` in `src/prisma/seed.ts`, `src/prisma/users.ts`, and any route files that query `db.orm`, then rerun.
51
51
3. Edit the starter contract under `src/prisma/` into a small schema for my use case, then run `npm run contract:emit` and plan and apply the migration: `npx prisma-next migration plan`, then `npx prisma-next migrate --yes`. Migration planning diffs the emitted contract, so the emit step is required.
52
52
4. Update the seed script and the app routes to query the new schema, start `npm run dev` in the background, and verify with a request against the running app. For the `nest` template, if routes return 500s with `reading 'findAll'` in the logs, add explicit `@Inject()` tokens as shown in https://www.prisma.io/docs/guides/next/frameworks/nestjs.md.
53
-
5. Deploy with Prisma Compute. First apply the framework's deploy requirement from the guide at https://www.prisma.io/docs/guides/next/frameworks/[guide].md, where [guide] is the template name except: template `next` → guide `nextjs`, `nest` → `nestjs`, `svelte` → `sveltekit`. The requirements: Next.js needs `output: "standalone"` in `next.config.ts` (without it the deployed app returns 504s), TanStack Start needs the nitro build plugin, Astro needs the `@astrojs/node` adapter plus `--env HOST=0.0.0.0`, and Elysia needs `--framework bun --entry src/index.ts` on the deploy command. If the template is `svelte`, skip this step; Compute does not support SvelteKit yet. Check `npx @prisma/cli@latest auth whoami`. If I am not signed in, stop and ask me to run `npx @prisma/cli@latest auth login`, because that step opens a browser. Then run `npx @prisma/cli@latest app deploy --env .env` so DATABASE_URL reaches the deployment, and verify the deployed URL with curl.
53
+
5. Deploy with Prisma Compute. First apply the framework's deploy requirement from the guide at https://www.prisma.io/docs/guides/next/frameworks/[guide].md, where [guide] is the template name except: template `next` → guide `nextjs`, `nest` → `nestjs`, `svelte` → `sveltekit`. The requirements: Next.js needs `output: "standalone"` in `next.config.ts` (without it the deployed app returns 504s), TanStack Start needs the nitro build plugin, Astro needs the `@astrojs/node` adapter plus `--env HOST=0.0.0.0`, and Elysia needs `--framework bun --entry src/index.ts` on the deploy command. If the template is `svelte`, skip this step; Compute does not support SvelteKit yet. Check `npx @prisma/cli@latest auth whoami`. If I am not signed in, stop and ask me to run `npx @prisma/cli@latest auth login`, because that step opens a browser. Then run `npx @prisma/cli@latest app deploy --create-project my-app --env .env` so DATABASE_URL reaches the deployment, and verify the deployed URL with curl.
54
54
55
55
Use the installed Prisma Next skills and the current Prisma docs: https://www.prisma.io/docs/llms.txt (append `.md` to any docs URL for a markdown version).
Copy file name to clipboardExpand all lines: apps/docs/content/docs/(index)/prisma-compute/deploy.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ It asks for a template, a database provider, and a few options, then asks **"Dep
69
69
70
70
So your deployed app has a database from its first request.
71
71
72
-
To skip the prompts, pass your choices as flags. Compute deploys are available for the `hono`, `elysia`, `next`, and `tanstack-start` templates:
72
+
To skip the prompts, pass your choices as flags. Compute deploys are available for every template except `svelte` (that is `hono`, `elysia`, `nest`, `next`, `astro`, `nuxt`, `tanstack-start`, and `turborepo`):
1.**Detects your framework** from your project files, whether that is Next.js, Nuxt, Astro, Hono, NestJS, TanStack Start, or a plain Bun server. To choose it yourself, pass `--framework` (use `--framework bun` for a Bun or Elysia server).
91
-
2.**Sets up a project** the first time you deploy from this directory, then writes [`.prisma/local.json`](/compute/getting-started#link-an-existing-project) to pin the directory to that project. That file is a gitignored local cache, not committed config. If your team already has a project, [link it first](/compute/getting-started#link-an-existing-project).
91
+
2.**Sets up a project** the first time you deploy from this directory: it asks you to pick or create one (pass `--create-project <name>` to skip the prompt, which non-interactive runs need), then writes [`.prisma/local.json`](/compute/getting-started#link-an-existing-project) to pin the directory to that project. That file is a gitignored local cache, not committed config. If your team already has a project, [link it first](/compute/getting-started#link-an-existing-project).
92
92
3.**Resolves the target branch.** Inside a Git repository, the CLI uses your current Git branch name; otherwise it falls back to `main`. Pass `--branch <name>` to choose explicitly. Because each branch is its own isolated environment, this decides where the deploy lands.
93
93
4.**Builds and uploads your app**, provisions it, and prints a live URL.
Copy file name to clipboardExpand all lines: apps/docs/content/docs/(index)/prisma-orm/quickstart/prisma-postgres.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,7 +126,7 @@ datasource db {
126
126
Create a Prisma Postgres database and replace the generated `DATABASE_URL` in your `.env` file with the `postgres://...` connection string from the CLI output:
Copy file name to clipboardExpand all lines: apps/docs/content/docs/(index)/prisma-postgres/quickstart/prisma-orm.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,8 @@
2
2
title: Prisma ORM
3
3
description: Create a new TypeScript project from scratch by connecting Prisma ORM to Prisma Postgres and generating a Prisma Client for database access
4
4
url: /prisma-postgres/quickstart/prisma-orm
5
-
metaTitle: 'Quickstart: Prisma ORM with Prisma Postgres (5 min)'
6
-
metaDescription: Create a new TypeScript project from scratch by connecting Prisma ORM to Prisma Postgres and generating a Prisma Client for database access.
5
+
metaTitle: 'Quickstart: Prisma Postgres with Prisma ORM (5 min)'
6
+
metaDescription: Set up Prisma Postgres in a new TypeScript project with Prisma ORM. Create the database, connect, and run your first type-safe queries.
7
7
---
8
8
9
9
[Prisma Postgres](/postgres) is a fully managed PostgreSQL database that scales to zero and integrates smoothly with both Prisma ORM and Prisma Studio. In this guide, you will learn how to set up a new TypeScript project from scratch, connect it to Prisma Postgres using Prisma ORM, and generate a Prisma Client for easy, type-safe access to your database.
Copy file name to clipboardExpand all lines: apps/docs/content/docs/compute/getting-started.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ Now `npm run deploy` does the same thing.
72
72
73
73
## Link an existing project
74
74
75
-
On your first deploy, the CLI creates a project for you. If your team already has one, link to it before you deploy instead:
75
+
On your first deploy, the CLI asks you to pick or create a project; pass `--create-project <name>` to skip the prompt. If your team already has one, link to it before you deploy instead:
0 commit comments