Replies: 1 comment
-
Hi @veyis 👋 The error message you're seeing, Prisma is designed to run in a server-side environment and it does not support running directly in the browser. This is because Prisma needs to connect to your database, which should not be exposed directly to the client-side for security reasons. If you're seeing this error in a Next.js application, it could be because you're trying to use Prisma in the client-side part of your application. Prisma should only be used in server-side parts of your application, such as API routes. You can take a look at this closed issue to see how other users solved the same error. |
Beta Was this translation helpful? Give feedback.
-
Bug description
Unhandled Runtime Error
Error: PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in
unknown
).If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report
How to reproduce
Expected behavior
Prisma information
// Add your schema.prisma
// Add your code using Prisma Client
Environment & setup
Prisma Version
Beta Was this translation helpful? Give feedback.
All reactions