-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
wasm-edge-light-loader.js
importing node:crypto
instead of using globalThis.crypto
#24415
Comments
This seems connected to #24386, which was opened 2 days ago. This makes me think that this problem is not connected to today's release, Prisma 5.15.0. Thanks for the reproduction, we'll take a look and investigate why this issue is happening. Thanks! |
(Reproduction is also still using 5.14.0, so safe to say not related to today's 5.15.0) |
Hey @p6l-richard, gave this a quick shot:
Am I missing something? |
Oh great catch, it was named "" - I've updated it. Thanks for pointing this out and good to see that the copy of env.example did the trick. p6l-richard/prisma-repro@8e8d030 Re: package versions It is possible that there's a drift between releases somehow. However, I merely ran Anyways, I'll take a look later and cycle back. |
I've also attempted a reproduction. After doing that - and updating |
You didn't, we just released Prisma 5.15.0 yesterday 😆
Good catch @jkomyno, I can confirm that. So optimally you update all the versions @p6l-richard and then update your reproduction. |
Oh by the way: We do have another bug report that mentions (It is a bug in |
(We figured out via another channel that this |
So the issue remaining seems to be the module resolution error on |
Closing the issue here then, as Prisma works as expected. Good luck figuring out the rest 🤞 |
Bug description
Problem
When using Prisma in conjunction with NextAuth on the Next.js middleware, you'll see an error from the
wasm-edge-light-loader.js
as it attempts to importnode:crypto
.This requires users currently to split up the NextAuth configuration file to exclude prisma from the configuration that's exported from the next.js middleware file:
How to reproduce
gh repo clone p6l-richard/prisma-repro
cd prisma-repro
pnpm i
pnpm run turso
(to set up env vars)pnpm dev
Check the console
Expected behavior
Be able to define Prisma in NextAuth single configuration so that we can import it in the nextjs middleware:
Prisma information
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: