I just got an error "PrismaClient is unable to be run in the browser" [Shopify Hydrogen/remix]

376 Views Asked by At

I'm trying to run prisma on hydrogen/remix but I'm getting this error when I try to write queries on the loaders.

js export async function loader({request, params, context}: LoaderArgs) { invariant(params.pageHandle, 'Missing page handle'); return prisma?.page.findFirst({ where: {slug: params.pageHandle}, }); ... enter image description here

0

There are 0 best solutions below