Skip to content
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

Getting "PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in 'node')" after Upgrading prisma #137

Open
fddayan opened this issue Mar 5, 2024 · 1 comment

Comments

@fddayan
Copy link

fddayan commented Mar 5, 2024

After upgrading prisma and prisma-client to 5.10.2 and upgrade jest-prisma to 1.8.0 I have been getting

PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in "node"). If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report

Full error:

 ● Test suite failed to run

    PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `node`).
    If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report

      at Object.get (../../../node_modules/.prisma/client/index-browser.js:505:15)
      at PrismaEnvironmentDelegate.teardown (../../../node_modules/@quramy/jest-prisma-core/lib/delegate.js:69:29)
      at PrismaEnvironment.teardown (../../../node_modules/@quramy/jest-prisma/lib/environment.js:22:60)

I think is related to this line:
https://github.com/Quramy/jest-prisma/blob/main/packages/jest-prisma/src/environment.ts#L4

@Quramy
Copy link
Owner

Quramy commented Mar 5, 2024

It’s related to #133

Use jest-prism-node, https://github.com/Quramy/jest-prisma/tree/main/packages/jest-prisma-node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants