#Unable to run Prisma in Vitest

2 messages · Page 1 of 1 (latest)

dense pendant
#

Hello! I've been running Prisma in Vitest for my tests for quite some time, but with the latest vitest 1.0 + vite 5 update I am no longer able to do so.

When I run my tests, I get the following error:

Error: PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `node`).

I'm using the following versions for related dependencies:

prisma: 5.7.1
@prisma/client: 5.7.1
vitest: 1.1.0
vite: 5.0.10

Any advice/pointers for how to investigate this would be super appreciated! 🙂

fringe vector
#

Hey there 👋 I'm not sure what the issue could be here but if this happened after upgrading Vitest, the issue might be with Vitest and not with Prisma? Have you reached out to their community about this already?