PrismaClient is unable to be run in the browser although I'm not trying to
I'm getting a prisma error saying "PrismaClient is unable to be run in the browser" although I'm 99.99% sure I'm not trying to. I shouldn't have any piece of code that is supposed to run on the client.
I looked into every file multiple times and couldn't find the culprit. Can anyone help me with this?
repo: https://github.com/xDarkyne/canwecoop
how to reproduce: simply run yarn dev and navigate to localhost:3000 and you'll get the error (you need postgresql (docker included) and run npx prisma generate and npx prisma db push)
Repository does not exist.
Repository does not exist.
Sorry changed the visibility to public
@janpio Solved the issue. Problem was a index.ts file looking like this
export * from './file1';
export * from './file2';
export * from './file3';
export * from './file4';
export { default as prisma } from './prisma';
so when importing anything exported from file 1-4 I got the error that prisma isn't able to to run in the browser. After removing the index file and only importing code from their respective files I didnt get this error anymore
Same here. I am calling prisma in a .server file on Remix, but it is returning this same error.