Prisma with multi environments
Hello there,
I'm trying to use Prisma for both
development
and production
environment. I have two environment files:
- .env.development
- .env.production
...Turborepo setup not working with prisma: Cannot find module `fs`
I have started to migrate my basic NextJs application to turborepo and am facing some issues with using prisma client. I have a nextJs app with trpc among others and we use mongodb. I have followed this link https://www.prisma.io/docs/guides/using-prisma-orm-with-turborepo but I see that while I am using this from the web app I see an error regarding the use of
fs
in the browser. Upon inspecting the generated/client/index.js file I see this code <attached screenshot>. Can anyone please help re...
pulse something went wrong
Hi, i keep getting the message when i try to create project. currently im hosting database at Neon as i need data to near to me which is Singapore. but now i cant create project for my prisma pulse. i did try sslmode=disable
postgresql://neondb_owner:[password]@ep-billowing-sound-a1tdsq6a-pooler.ap-southeast-1.aws.neon.tech/neondb?sslmode=require
i also not sure to use pooling or not....
Prisma Accelerate and Aurora Serverless
Hello, I'm looking to set up prisma accelerate with a database hosted in AWS. We are moving away from render.com because our clients are enterprise and only have AWS as an approved vendor.
We use serverless functions for our back end, so we'd like to use accelerate or another connection pooler to avoid maxing our db connections.
We were looking at Aurora Serverless for our db option. It doesn't seem like aurora serverless supports static IPs, so we are unsure how we'd connect accelerate to aurora serverless. ...
How to properly deal with connections pool and disconnects
Hi everyone! At the company that I work, we were facing a problem where too many Prisma connections were making our database slow down considerably, freezing our entire system, we them added a bunch of disconnects after some important and long queries (this is a production env) , the problem was solved, at peak we had 5k connections and now we are sitting at 600ish
Now some important parts of our system are throwing the following error: Transaction ID is invalid, refers to an old closed transaction Prisma does not have information about it anymore, or was obtained before disconnecting.
We thought that maybe we were disconnecting too much, and possibly affecting ongoing transactions, we are trying to narrow down removing some disconnects, but we fear that our problem with the DB (Postgresql) happens again. I would be glad if someone could provide some guidance, what should be investigated, and possible solutions...
Issues with Prisma in Turborepo
I'm essentially generating the client and compiling a commonjs version so that i can use my Prisma client across our monorepo. this works, however, when i try to extend the client to use extensions, it breaks with the following error:
I've been at this for a day now, and I'm slowly losing my sanity with this. I don't understand why extending the client would break it. I tried looking for flags to include extensions in the generated client but couldn't find anything....
Error: Cannot find module '.prisma/client/default'
Error: Cannot find module '.prisma/client/default'

What is the good practice for migrations and keeping them on GitHub?
Hello, I started my full stack project and currently we are in dilemma. Here is the scenario, our database will update accordingly with the project, we want to release some feature later let's use Reddit karma for example which is (I assume) only one table column added, if our project already has a lot of online users is there a way we can update our database without resetting and how to do it?
I assume it is with prisma migrations, if that is the case, should we keep the migration files on our GitHub repository or are we allowed to either delete them or add them to .gitignore?
Thank you in advance....
Find the way to write unit-test by postgres in memory db
Hi, I'm starting to write unit-test but I don't want to use docker to mock DB. Any way to use in memory postgres db?
Prisma postgres and replicas
Hi,
I'm starting to use Prisma postgres on a new project.
For that project, we will need to be able to plug data from the database to the datalake....
How are the cold starts?
How are prisma coldstarts on cloud functions/serverless environments, like Lambdas?
Prisma schemas and plugins
Hello everyone,
So here's my issue - We're working on a project that has a plugin architecture. Basically there's a main program and different plugins that run on top of it (similar to Wordpress). Plugins are loaded dynamically using "away import". It should be noted that we use MongoDB as a backend. There is a collection with a list of plugins to be loaded.
There's a main schema with general collections, and plugins can create their own plugin-specific collections as well. A plugin may also access collections in the general schema, but not the other way around.
Installing a plugin is as simple as copying its js file into a plugins subdirectory (if it's written in TypeScript it has to be precompiled), and running a plugin specific install script. The main program is not rebuilt when a plugin is installed. It should be noted that plugins do not have their own copy of node_modules, since they're not considered as separate apps.
So, I think you see where I'm going with this - How do I deal with various plugins, that are loaded dynamically, with each having its own schema without having them overwrite each other? And how do we allow a plugin to access the main schema?...
Nullable Datetime Field
hello i'm trying to create a field
last_purchase_date
but there's a case where user has not purchased yet so i want the field to be null.
this is what i have in schema.prisma
```
model Item {...ConnectorError after moving to Prisma Postgres
I am in the process of migrating from a Neon postgres db to a Prisma Postgres db. I followed the migration docs to transfer my data and table structure: https://www.prisma.io/docs/getting-started/prisma-postgres/import-from-existing-database-postgresql
After doing this, I am able to load all data, but any delete or update is failing with this error:
```...
Next + Cloudflare Workers + D1
I'm trying to use Prisma in a Next app on Cloudflare Workers and D1.
I have gone through all the setup steps and tried to use the ...FORCE_WASM...=1
But on actual deploy, I keep getting
fs.readdir
not available. My understanding is that this should work, that prisma supports edge runtimes (examples for prisma+d1 exist), and that something is not being built or setup right such that prisma doesn't try to use functions it knows it shouldn't in an edge runtime...Vite + D1 + Cloudflare Workers + Prisma
I've used Prisma + D1 + Cloudflare workers before and it's been a great experience.
I'm not trying to use the same tack with Vite + Honox (https://github.com/honojs/honox/tree/main) in the mix.
My vite config uses two plugins:...
Latency to/from US-east <-> US-east and Denmark <-> Paris
Really struggling with long latency for my queries - are these numbers what I can expect from your hosted Postgres solution ?
(Thx. for the ORM btw - really awesome).
I am currently assessing your hosted solution and on paper it looks great, but I am really struggling with large latencies. I am situated in Denmark and am doing tests against a database in Paris, but experiencing same long latency when using a database in US east with a Vercel hosted solution in US east as well....

<fields> is missing.
Created a simple post request that should create a user with a specific name, but I get an error
```prisma
generator client {
provider = "prisma-client-js"
}...
PgBouncer and Prisma
hi! if my db has a 500 connection limit and i'm using pgbouncer in between, with prisma, what should the connection_limit be set to in my db string? i see these strange spikes where queries suddenly start taking much, much, longer and the database is not struggling nor is the application code.
my hunch is that prisma connections are somehow backing up / not being freed up correctly and it's leading to a backed up queue.
...
Prisma initialization failing in prod Prisma Postgres
``⨯ Error [PrismaClientInitializationError]:
Invalid
prisma.user.findUnique() invocation:
error: Error validating datasource
db: the URL must start with the protocol
postgresql:// or
postgres://`....