3,735 questions
-2
votes
0
answers
21
views
Remove the ?schema=public from database url [closed]
I learn this on github forum, others devs are having the same problem since prisma uptade to 7.0.0 version.
Font: https://github.com/prisma/studio/issues/1363
Best practices
1
vote
1
replies
38
views
What is the best practice for sharing types between a NestJS API with Prisma ORM and client applications?
We currently have a NestJS API using Prisma ORM. The API is used by multiple Next.js applications in different repos. To help with type safety across the various repos, we have a common "types&...
0
votes
0
answers
42
views
Nestjs @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again
I am using pnpm [email protected] and Prisma 6.19.0 for a backend application. When I add the Prisma service, I get the error
Nest] 46276 - 17/11/2025, 12:45:49 ERROR [ExceptionHandler] Error: @prisma/...
-1
votes
0
answers
29
views
prisma p1001 error - Can't reach database server at `aws-1-ap-south-1.pooler.supabase.com:5432`
This is the schema in my prisma.schema:
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
...
0
votes
0
answers
27
views
Can I share a prisma model between two other models with a one-to-one relationship?
I want to create the model Phone that can be used in either model User or model EmergencyContact for simplification.
Example:
model EmergencyContact {
id String @id @default(cuid())
...
0
votes
0
answers
36
views
Prisma include becomes undefined when importing nested include objects across multiple files
Problem
I'm working with Prisma and TypeScript and I have a set of nested include objects split across multiple files.
However, when I import and use them in a repository, some of the nested includes ...
1
vote
1
answer
355
views
Cannot find module 'generated/prisma' or its corresponding type declarations
I am following the NestJs Prisma docs. I followed every step but I keep getting this error:
Cannot find module 'generated/prisma' or its corresponding type declarations.ts(2307) in this line: import { ...
1
vote
1
answer
116
views
Next.js 16 Cache Components: Why is my cache() function still hitting the database on every request despite using next: { revalidate: 3600 }?
I'm using Next.js 16 with Cache Components (cache() from React) to deduplicate and cache database queries across layouts and pages.
Here's my setup:
// lib/data.ts
import { cache } from 'react';
...
1
vote
1
answer
37
views
Prisma - Sorting by function applied on a column
I want to use a function in my orderBy clause. To my great surprise I can't find a way in the official documentation to do this without executing raw SQL in Prisma. This is similar to what Python or ...
-1
votes
1
answer
114
views
How to use Prisma with Neon Serverless from Vercel? [closed]
I'm trying to use Prisma with neon/serverless from vercel. When I run npm run dev, I get this error message:
Argument of type 'Pool' is not assignable to parameter of type 'PoolConfig'.
Types of ...
0
votes
1
answer
73
views
Prisma won't execute seeder in nextjs
whenever i run npx prisma db seed it returns this error:
Prisma config detected, skipping environment variable loading. Running seed command `ts-node prisma/db/seed.ts` ...
Error: Cannot find package ...
1
vote
0
answers
68
views
Prisma P1000 Authentication Failed with Docker PostgreSQL - Complete Troubleshooting Guide
I'm encountering a persistent P1000 Authentication Failed error when trying to connect Prisma to a PostgreSQL database running in Docker. Despite having correct credentials and a running container, ...
0
votes
0
answers
81
views
I got an error with Nest js and Prisma ORM
I’m setting up Prisma with NestJS.
I created a PrismaModule and a PrismaService file. I want to add my own middleware for soft delete, but I’m facing an error.
generator client {
provider = "...
0
votes
1
answer
220
views
Getting Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again
This is the error it's giving when I run npm run build:
ml@M-----MacBook-Air skyfold.dev % npm run build
> [email protected] build
> next build
▲ Next.js 15.4.6
- Environments: .env
...
0
votes
0
answers
73
views
Issue in sending binary image data (LONGBLOB in MySQL, Bytes in Prisma) to my front-end as a PNG
So, I have an issue with my Fullstack app, in which I have "images" in my "log" database stored as bytes that contains data to my PNG images in my database. I however cannot load ...
0
votes
2
answers
1k
views
How to properly run seeds in Prisma 6+ using modern configuration with prisma.config.ts?
I'm using Prisma 6.13 in a project with NextJs and I want to implement the seed process using the new modern configuration approach prisma.config.ts as recommended by Prisma in recent versions.
I'm no ...
0
votes
1
answer
199
views
Prisma + Neon + better-auth: Failed to create user Error [PrismaClientValidationError]
The error after clicking signup button (the minified code is so long so I left out unimportant part)
2025-07-31T13:14:19.733Z ERROR [Better Auth]: Failed to create user Error [...
0
votes
1
answer
87
views
Efficient way to partially match stringified JSON in a string column using Prisma (without full JSON match)
I'm trying to find a record where a column (payload) stores a stringified JSON object. The column type is string (as defined in Prisma schema) — so it's not a JSON or JSONB type.
I want to check if a ...
0
votes
2
answers
118
views
How do I resolve Prisma ORM drift after making values non nullable with CockroachDB? [closed]
My database is CockroachDB, my Prisma version is 6.11.1.
I added these two models:
model Font {
id String @id @default(uuid())
name String @unique
created_at DateTime ...
0
votes
0
answers
49
views
How to execute data transformation scripts (like password encryption) during Prisma migration?
I'm using Prisma with MySQL. My current database stores passwords in plain text, and I need to migrate them to bcrypt hashes.
When deploying this change via prisma migrate dev, I need to:
Update the ...
2
votes
2
answers
527
views
AuthJS / Next-Auth using middleware getting error
I am developing an application to learn NextJS and getting deeper to its concepts.
Im following a course that teaches most needed things to build a full-stack application using NextJS.
The stack I'm ...
1
vote
0
answers
89
views
How to use database transactions in the repository pattern
I would like to know how to use the repository pattern with Prisma transactions.
I am using OAuth, so when the user authenticates, I need to populate the user, account and session tables. If any of ...
0
votes
1
answer
111
views
Prisma can't connect to Supabase PostgreSQL: P1001 Error
I'm trying to connect Prisma to a Supabase PostgreSQL database but keep getting P1001: Can't reach database server errors. Here's my setup:
Environment
OS: Windows 11
Tools: Prisma (+ Node.js), ...
0
votes
0
answers
162
views
PrismaClient does not accept database URL from PrismaPg Adapter
I am using PrismaClient with PrismaPg Adapter to connect to postgres database. In the env variables correct DATABASE_URL is present, I am also debugging output of Prisma Client there the PrismaPg ...
0
votes
0
answers
40
views
NextJS and Prisma error - TypeError: Cannot read properties of undefined (reading 'findMany') at GET
I keep getting this error with NextJS and Prisma when trying to pull the categories for my website (I'm using MongoDB):
TypeError: Cannot read properties of undefined (reading 'findMany')
at GET
I've ...