Content-Length: 337377 | pFad | https://github.com/nextauthjs/next-auth/pull/12755

63 fix(prisma): import `PrismaClientKnownRequestError` for edge runtime compatibility by twinh · Pull Request #12755 · nextauthjs/next-auth · GitHub
Skip to content

fix(prisma): import PrismaClientKnownRequestError for edge runtime compatibility #12755

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

Merged
merged 2 commits into from
May 9, 2025

Conversation

twinh
Copy link
Contributor

@twinh twinh commented Mar 10, 2025

☕️ Reasoning

Previously, PrismaClientKnownRequestError was imported from @prisma/client/runtime/library,

which is intended for Node.js and causes a runtime error ("TypeError: Cannot read properties of undefined (reading 'exec')") in edge environments.

This change imports it from @prisma/client to ensure proper functionality in edge runtime.

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

Fixes #12731

📌 Resources

@twinh twinh requested a review from ndom91 as a code owner March 10, 2025 09:02
Copy link

vercel bot commented Mar 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 9, 2025 4:53am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview May 9, 2025 4:53am

Copy link

vercel bot commented Mar 10, 2025

@twinh is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added adapters Changes related to the core code concerning database adapters prisma @auth/prisma-adapter labels Mar 10, 2025
@ThangHuuVu
Copy link
Member

thanks for the fix!

Copy link

codecov bot commented May 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 39.26%. Comparing base (6a0fa0c) to head (f309a13).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12755      +/-   ##
==========================================
- Coverage   39.26%   39.26%   -0.01%     
==========================================
  Files         200      200              
  Lines       31643    31642       -1     
  Branches     1374     1380       +6     
==========================================
- Hits        12425    12424       -1     
  Misses      19218    19218              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ThangHuuVu ThangHuuVu merged commit c7409f3 into nextauthjs:main May 9, 2025
13 of 15 checks passed
@twinh twinh deleted the patch-2 branch May 13, 2025 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adapters Changes related to the core code concerning database adapters prisma @auth/prisma-adapter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Runtime Error: Authentication crash when using PrismaAdapter (mongodb) - TypeError: Cannot read properties of undefined (reading 'exec')
2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/nextauthjs/next-auth/pull/12755

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy