-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there anyway to get Prisma ORM to work with this, Using Native Postgres #71
Comments
I don't think your issue is related to open next - but to running Prisma on workers. You can check the docs and ask questions on the cloudflare discord if you need help. It's always better to have a minimal repro when asking for help. Does it make sense? |
Sorry - I should have noted and provided an example repo. The reason why I asked if that this repo intent was allow NextJS apps to run on the node runtime on Workers. I assumed that since Prisma worked on nodejs - that this would do the same. It appears that Prisma isn't compatible as it's still needs fs - which isn't available in the runtime. I guess I misunderstood what this package's goals were. Everything else worked perfectly except for a native db connection with Prisma. I didn't know if there was a workaround for these type of things. |
Prisma works on workers. You can check the Prisma docs and cloudflare docs. The thing is that you probably do not have the correct setup for Prisma and that's why I'm directing you the discord to get help with your setup. |
"When deploying a Cloudflare Worker that uses Prisma ORM, you need to use an edge-compatible driver and its respective driver adapter for Prisma ORM." Right - it works when you are using a serverless driver. I am looking to connect via standard Postgres native - which is available when using nodejs runtime, which is what I thought this packaged helped you do. I'll connect via discord / thanks! "You may want to consider using @opennextjs/cloudflare ↗, which allows you to build and deploy Next.js apps to Cloudflare Workers, use Node.js APIs that Cloudflare Workers supports, and supports additional Next.js features." |
@gregavola do you think you can close that issue and handle that in the workerd discussion (see #76)? |
I added it here: cloudflare/workerd#2858 Thanks |
I added a ref back to this issue on the discussion. Thanks for moving it there. |
It appears there are some missing Node file reads, but I'm wondering if there is anyway to get this working with Prisma. This fails anytime we call the Prisma Client.
"Error: [unenv] fs.readdir is not implemented yet!",
The text was updated successfully, but these errors were encountered: