Prisma

P

Prisma

The official Discord server of Prisma! Find us online at prisma.io

Join

Console Spam: "CODE: PrismaClientOnContextInstanceOfStrategyFailed"

Hey guys, getting a constant spam of this error/warning: ``` CODE: PrismaClientOnContextInstanceOfStrategyFailed WARNING: Prisma Client on GraphQL context failed being checked using instanceof REASON: The Prisma Client class reference imported from @prisma/client is not the same class used by you to create your Prisma Client instance....

prisma-client "Model" suffix?

The "prisma-client" early access docs say to import models like this
import { User, Post } from "./generated/prisma/models.js"
import { User, Post } from "./generated/prisma/models.js"
...

Rate Limited. Account on "Hold"

Hi. Getting the following: This request could not be understood by the server: {"type":"UnknownJsonError","body":{"code":"P6003","message":"There is a hold on your account. Reason: planLimitReached. Please contact Prisma support if you think this is an error."}} (The request id was: 955bf7c6ded414f2) We are on starter plan in vercel. We don't even need accelerate but at this point this hold is affecting production. How can we move past this?...

Optimize console gives 500 error

I tried signing up on console.prisma.io, but after trying either with a personal email or with a different account via Github social login, it doesn't matter what I do, when I click on the "Optimize" - the reason I'm interested to have an account, it gives me a 500 error. It's been going for a few days now, does anyone knows if there is an issue? Or maybe an issue to the instance my account is attached to?...
No description

ESM with D1 and prisma-client-js

As far as I know the D1 adapter needs prisma-client-js, but I can't get ESM generated JS with that client. I need to switch to prisma-client, which does generate ESM, but doesn't work with the D1 adapter. How can I reconcile the 2?...

$transaction with an array

When passing an array of Prisma requests to the $transaction function, does it execute the entire batch in one transaction?

Inconsistent client generations (build breaking)

I’m using Prisma + Cloudflare D1, it took a long time to find the magic configuration, and it’s mostly worked up until now. This is my config: ```...
No description

Convert Prisma enum to Typescript enum (and opposite)

Hey guys, I have this Prisma enum: ```prisma enum ChallengeMetric {...

ESM support in Prisma Client

I'm facing difficulty spinning up my backend application when using a shared package that contains the Prisma DB client. For context, my server uses the ESM module type, and I was wondering if it's possible to convert the generated Prisma client into ESM. I explored Prisma’s moduleFormat: "esm" option, but it seems to omit key exports like error classes and other members from the Prisma namespace. Can you help me understand what's going wrong or if there's an additional fix required? I'm using Turborepo and tsup to compile my database package and also generate .d.ts files to export types. Let me know if anything specific needs to be configured to make ESM work properly....

Changes to the schema on production

Alright, so i deployed but no i have to adapt. Still in testing so better get used to how prisma pushes new segments to postgres tables. Case 1 i change a default from false to true Its asking yo reset which we cant do anymore. Trying the prisma migrate --create-only, prisma migrate deploy prisma migrate dev approach...

Queries 200-400ms slower after migrating to queryCompiler (6.10.1)

I've recently migrated to the new queryCompiler and even after noticing mention of the new performance improvements in 6.10.1 I am still seeing a big degration to all my queries, at least 200 to sometimes like 600ms slower. I'm running on serverless environment. I"m using Postgres and I have views setup and some of my queries are using transactions but after switching back to the non queryCompiler things are back to how they were before. Is there a starting point on how I can debug what's going on here, I'm not seeing any improvement here....

Accelerate errors

I just had a huge spike of these errors in my production database. My dev database is still hit and miss. Was there / is there an ongoing accelerate service outage? Both my prod and dev database are accessible. {"type":"UnknownJsonError","body":{"code":"P6008","message":"Accelerate was not able to connect to your database. The underlying error is: Engine did not respond in time."}}...

Can't create database with new account (in any region)

I just created a new account on Prisma, and wanted to set up a database, but I keep getting errors when trying to create a database. Doesn't matter which region I choose. I made a video to show this: https://sdia.unternehmens.cloud/s/NSZcRNiDZqTxAWc Valid until: 2025-08-23...

D1_ERROR: too many SQL variables at offset 340: SQLITE_ERROR

Prisma 6.10.1 / D1 adapter This error occurs when calling findMany with 100 rows, each including nested 100 rows. If I reduce the number of rows on both (e.g. take:10) it works....

Prisma database name overwritten with localhost IP

I am new to prisma and have no idea how to fix this problem, an unusual issue: ``` export const prisma = remember('prisma', () => { const connectionString = ${process.env.DATABASE_URL};...

Error configuring adapter using the new "prisma-client" ts esm generator

For some reason the "adapter" property is showing an error as if doesn't exist, even though it only works if I pass the adapter. Here is my Schema: ``` datasource db {...
No description

wasm-engine-edge not found

I am getting a very weird error when building my Vite project:
Error: Could not load /Users/project/node_modules/@prisma/client/runtime/wasm-engine-edge.js: ENOENT: no such file or directory, open '/Users/projects/node_modules/@prisma/client/runtime/wasm-engine-edge.js'
Error: Could not load /Users/project/node_modules/@prisma/client/runtime/wasm-engine-edge.js: ENOENT: no such file or directory, open '/Users/projects/node_modules/@prisma/client/runtime/wasm-engine-edge.js'
...

multi file schema

I'm creating a new project with new schema and i want to use multi-file approach. I have the directory "prisma" where is add the file schema.prisma with this content generator client { provider = "prisma-client-js" output = "../generated/prisma"...

Prisma + Supabase self-hosted

Hi I've got an issue I can't seem to find a solution to. I've setup a self-hosted Supabase on a Hetzner cloud server, and I can no longer use npx prisma ... commands, all of them returns the error below: Error: P1001: Can't reach database server at {server_ip}:5432 ...

Remix, prisma, neon, fly.io: Can't reach database server

Hi, I'm using prisma in a remix app deployed to fly.io and connecting to a neon db. Everything was deploying and working fine at first, then after a deployment on June 18th, the prisma client keeps showing "Can't reach database server at DATABASE_URL". After trying out some ideas with someone from neon, I traced through my server logs to find the last time it worked, and found that between a successful deployment and the broken one, prisma v6.10.0 was related. PNPM automatically installed that when building my docker image and I'm not finding anything else that might be related. I tried pinning prisma to v6.9.0, but I'm still getting the same error. I'm not sure how to reproduce this or if the problem is with the prisma client so I can't really open a bug report. Has anyone else see this issue? I'm not using any prisma adapters so I'm probably using a rust engine. I'm also able to run prisma cli commands and connect to the neon database with prisma studio without any issues....