Comments (18)
The Prisma code is pretty stable and used by hundreds of thousands of users - so I would suggest you look more into how you use Prisma Client and share that with us in a way we can properly reproduce and understand what you are doing.
from prisma.
from prisma.
@liuhuapiaoyuan Can you try adding engineType = "library"
to the generator block in schema.prisma
file and check if that resolves the issue?
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
engineType = "library"
}
from prisma.
from prisma.
I would assume that same thing happens with engineType = "binary" as well, right?
from prisma.
Do you get this error with a hosted database as well? What happens if you don't use a locally running database?
from prisma.
from prisma.
Do you get this error with a hosted database as well? What happens if you don't use a locally running database?
I look at the code unless accelerate
is used
from prisma.
Just to confirm, are you invoking npx prisma generate
after adding engineType = "library"/"binary" to your schema file?
If not, could you run the prisma generate command and check?
from prisma.
Just to confirm, are you invoking
npx prisma generate
after adding engineType = "library"/"binary" to your schema file?If not, could you run the prisma generate command and check?
Of course~~
Every time I make a modification, I have executed npx prisma generate
from prisma.
Thanks for confirming!
Does this happen on a stable version of Next.js as well? It looks like you are using canary version.
from prisma.
yes,i using canary version
but, i think is not Next.js error.
you can watch source code
from prisma.
When exactly do you get this error?
When you try to do a Prisma Client query?
from prisma.
It seems that instantiating the Prisma instance is wrong
from prisma.
This code can reproduce this error. You can try id .
https://github.com/liuhuapiaoyuan/nextjs-prisma-edge-bug
from prisma.
The Prisma code is pretty stable and used by hundreds of thousands of users - so I would suggest you look more into how you use Prisma Client and share that with us in a way we can properly reproduce and understand what you are doing.
I just want to solve the issue of accessing the database in edge
within node-postgres
. Is there absolutely no way due to the problem with node-postgres
?
Additionally, my software actually needs to use sqlite
, and I need to use prisma
in the middleware of next.js
, for example, some logging. My scenario does not allow me to use serverless services.
from prisma.
I just want to solve the issue of accessing the database in edge within node-postgres. Is there absolutely no way due to the problem with node-postgres?
Yes, node-postgres
has a bug so it does not work in Next.js or deployed to Vercel, with or withour Prisma - nothing we at Prisma can do about that.
Additionally, my software actually needs to use
sqlite
, and I need to useprisma
in the middleware ofnext.js
, for example, some logging. My scenario does not allow me to use serverless services.
Next.js middleware always runs code in the "edge runtime", there is no way around that: https://nextjs.org/docs/app/building-your-application/routing/middleware#runtime
(Note: All these questions are off topic for this issue about Accelerate again. If you just want to have a discussion instead of report a bug, please open a discussion instead of an issue.)
from prisma.
OK OK , I understand. It's just that there is completely no way。
from prisma.
Related Issues (20)
- Generalize and Enhance Readability of "RecordNotFound" Error Message in Prisma Client HOT 1
- Log query params are not escaped
- 2D Array Support HOT 2
- Prisma and OpenTelemetry: has no active context in prisma query event
- Add createManyAndReturn() support for MariaDB
- Missing encoding for special characters for JSON columns in MYSQL HOT 2
- Cannot install prisma engines
- Prisma shouldn't just drop and re-create postgres schema to fix migration issues HOT 1
- [@prisma/instrumentation] Version 15.14.0 onwards using non existing generic in InstrumentationNodeModuleDefinition form @opentelemetry/instrumentation Library HOT 2
- [v5.15.0] bad type of `$extends` HOT 3
- Switching to a new database after startup
- Incorrect MongoDB array behavior when field is `null`
- ReadMe link for the current Roadmap is invalid HOT 1
- Why does my compilation always fail? Prompt me to migrate?
- Uncaught TypeError: Failed to resolve module specifier ".prisma/client/index-browser". Relative references must start with either "/", "./", or "../".
- add comment HOT 1
- Prisma Client: Unknown Argument HOT 2
- Cannot find module ".prisma/client/default" from "/app/node_modules/@prisma/client/default.js"
- OpenSSL 3.3.x Support
- queryRaw removes camelCase of renamed columns HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prisma.