Prisma

P

Prisma

The official Discord for the Prisma ORM and Prisma Data Platform! Learn more at https://prisma.io

Join

Unable to setup Prisma Optimize due to OpenTelemetry

hey, just trying to get opentelemetry setup in my application but i'm unable to figure out how? i followed Get started with tracing in Prisma ORM on the website but whenever i run my application, it throws the following error ```...

The relation field on model is missing an opposite relation field on the model

Hey ya'll. Not sure how to describe this, so I'll just post my code and issue. ```schema generator client { provider = "prisma-client-js"...

Kinde + Prisma ORM

Hey all having an issue when implementing Kinde on a personal project. Object literal may only specify known properties, and 'kindeId' does not exist in type 'UserWhereUniqueInput'.ts(2353) ...

@prisma/nuxt Error

getting this error in the console and Prisma Studio in Nuxt DevTools is not working
No description

Redwood-Tutorial/Prisma Help

Hello all, It was recommended by someone in the Redwood community that I seek help here. I'm hoping we have someone familiar with the Redwood tutorial that can assist me with the tutorial. I completed it and it had all the functionality suggested at the end of the tutorial but I had several test failures. I reset by repo back to end of chapter 6 and until I could identify when the errors start happening. Once I introduce this resolver in chapter 7, section: Accessing currentUser in the API side, Add Fields to the SDL and service, This is the file posts.js. Resolver: " export const Post = { user: (_obj, { root }) => db.post.findFirst({ where: { id: root.id } }).user(),"...
No description

Why is this error hapenning on seeding?

``` $ yarn db:seed yarn run v1.22.22 warning package.json: No license field $ tsx src/seed.ts...
No description

Prisma deployment in API with TypedSql

I added a TypedSQL query to my API but it breaks my deployment CI because where "RUN npx prisma generate" does not require access to the database, "RUN npx prisma generate --sql" wants access to the database to do that. Is there any good way to build the client without access to the database, if using the --sql flag?
Solution:
No, this is a strict requirement of the --sql flag. You need to have access to a database in order to generate the correct types.

prisma neon adapter

hey, is that the right way to implement the prisma neon adapter? ```import { PrismaClient } from "@prisma/client"; import { PrismaNeon } from "@prisma/adapter-neon"; import { Pool } from "@neondatabase/serverless"; ...

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

i made my friend clone my project on his pc fresh install of pgsql but idk why he cant connect to it same password same everything but it says it cant reach (pgadmin work) using bun 1.1.26 prisma 5.20.0...
No description

Prisma Optimize 1.0.1 errors

Hi all, I am having some trouble setting up prisma optimize. I've tried solutions presented in this thread https://discord.com/channels/937751382725886062/1270167207204356178/1270167207204356178 but I have yet to get it up and running. I am repeatedly getting this error...

Prisma Studio not respecting 'not null' fields?

I'm creating a model like this: ``` model Enquirer { fName String...

dependencies

Why does npm i --omit=dev still put prisma/typescript/etc. in node_modules? Is there a way to exclude these? They are taking up 50Mb+ of space in my deploy. I though only @prisma and .prisma were needed. I have

"devDependencies": {... "prisma": "^5.20.0",...

"devDependencies": {... "prisma": "^5.20.0",...
and ...

Typed SQL Queries for nested prisma/sql directories

Hello I am considering the new Typed SQL feature and building some modular, scalable file structure for my queries. Something like: ``` prisma/sql/ ├── admin/...

I’m trying to fix an error I’m encountering in my Prisma code: This expression is not callable.

What im trying to accomplish is that when user creates an new record, we give it highest sortOrder. The error occurs in the findFirst function, and here's the message I’m seeing: ```Find the first WorkExperience that matches the filter. Note, that providing undefined is treated as the value not being there. Read more here: https://pris.ly/d/null-undefined...

prisma/client 5.20

after i upgrade to prisma/client from 5.11 to 5.20, i have below error prisma queryRawUnsafe error TypeError: Cannot read properties of undefined (reading 'length') {...

Extending client not typesafe

I'm working in a NestJS project and need to extend the prisma client to replace all Date with string. I have this code: ```ts import { Injectable, OnModuleInit } from '@nestjs/common';...

Invariant violation: migration persistence is not initialized

I have a local environment where I have created prisma migrations and such, however, when I push those migrations that have run successfully on a local db, to my staging environment and have my build pipeline attempt to deploy those new migrations. I get this error. Why is that? How can I resolve this?

FindMany Where Confusion

I'm trying to do a simple "find many where" query on the following schema: TLDR: a course has a 1 to many relationship with a scheduled event. ```...

TypeError: Cannot read properties of undefined (reading 'exec')

"Hi, does anyone know why I'm getting a TypeError: Cannot read properties of undefined (reading 'exec') when using Prisma with @prisma/adapter-neon and Next.js? The error seems to originate in library.js and could be related to the environment or connection configuration. I'm attaching a screenshot with the stack trace and debug info. Thanks in advance!"
No description

Compilation error using prisma engines

I use Prisma for interacting with the database for my code and it worked fine. Coming back to my code I get these errors which is a bit confusing. It seems some of the error is coming from Quaint. I need help and an explanation, please ``` Value::Integer(i) => i.map(PrismaValue::Int).unwrap_or(PrismaValue::Null),...