Skip to content
Nilay Kabariya

Part 06 of the notebook

DATABASE

Database

Supabase, Postgres and Prisma errors, reproduced on a real local stack: the error code, the cause, the fix. Most of the posts are Prisma, because recent major versions changed things under working projects: the database URL left the schema file, P2002 lost e.meta.target on Prisma 7, and the Prisma 8 release candidate has no generate command. The rest: Postgres logins, Supabase row-level security and Drizzle's "Failed query" wrapper.

press / and paste the error your client printed.

By topic:Prisma (6)Node.js (4)

Entries

  1. No.117

    SASL: "client password must be a string" (node-postgres)

    node-postgres throws this before Postgres checks the password: the password it got is not a string. Eight ways to cause it, tested with pg 8.23.1, and the fix.

    > Error: SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string

    DATABASE2 min
  2. No.104

    SQLAlchemy 2.1: 'greenlet' library is required (asyncio)

    SQLAlchemy 2.1 no longer installs greenlet, so async engines fail unless something else adds it. Install sqlalchemy[asyncio]. Tested on 2.0.57 and 2.1.8.

    > ImportError: The SQLAlchemy asyncio module requires that the Python 'greenlet' library is installed. In order to ensure this dependency is available, use the 'sqlalchemy[asyncio]' install target: 'pip install sqlalchemy[asyncio]'

    DATABASE4 min
  3. No.102

    Fix: D1 "query result exceeded the maximum response size limit"

    Since 4 Nov 2026, D1 fails any query result over 50 MB, and wrangler dev doesn't show it. The exact cut, the first() and batch() traps, and paging that works.

    > D1_ERROR: D1 query result exceeded the maximum response size limit of 50 MB

    DATABASE4 min
  4. No.079

    Prisma P2002 on Prisma 7: e.meta.target is now undefined

    On Prisma 7, P2002 names the constraint on Postgres and e.meta.target is undefined on Postgres and SQLite. Where the field went, and the upsert race.

    > PrismaClientKnownRequestError:

    DATABASE4 min
  5. No.078

    Postgres password authentication failed (password is right)

    Changed POSTGRES_PASSWORD in docker-compose and the old one still works? The volume keeps it. Five causes of this Postgres error, reproduced with postgres:18.

    > psql: error: connection to server at "localhost" (::1), port 5432 failed: FATAL: password authentication failed for user "postgres"

    DATABASE5 min
  6. No.054

    Drizzle "Failed query" error: find the real cause

    Drizzle shows the SQL and params but not why it failed. Five causes reproduced, why e.code stopped working in 0.44, and the migration version.

    > DrizzleQueryError: Failed query: insert into "users" ("id", "email", "name") values (default, $1, $2)

    DATABASE4 min
  7. No.053

    Prisma P1012: "url is no longer supported in schema files"

    Prisma 7 rejects the url line every older tutorial uses. Reproduced on 7.10.0, plus directUrl, the .env trap and the adapter error that comes next.

    > Error: Prisma schema validation - (get-config wasm)

    DATABASE3 min
  8. No.050

    Prisma P1001: Can't reach database server at localhost:5432

    P1001 prints the same words for five different problems, Docker and Supabase included. Each one reproduced, plus a one-line check that tells them apart.

    > Error: P1001: Can't reach database server at `localhost:5432`

    DATABASE6 min
  9. No.047

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

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

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

    DATABASE5 minWindows
  10. No.046

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

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

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

    DATABASE7 min
  11. No.045

    Supabase 42501: new row violates row-level security policy

    Supabase's 42501 has two messages and seven causes. Each reproduced on a local stack, plus the October 30 change that breaks new tables.

    > {

    DATABASE6 min

Post card · Every Sunday

What broke this week.

One email on Sundays: the Node, TypeScript, Python and AI SDK releases that broke builds that week, each one reproduced, with a link to the fix that worked. Never shared, and you can leave any time.

— Nilay

or follow by RSSor on X

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

tip: paste the exact error text