Mellonaut
03/17/2022, 1:25 PMdev
but, running deploy returns this error in the browser: Uncaught TypeError: Failed to resolve module specifier ".prisma/client/index-browser". Relative references must start with either "/", "./", or "../".
I am instantiating Prisma in $lib/prisma.ts
like this:
import Prisma, * as PrismaAll from '@prisma/client'
const pc = Prisma?.PrismaClient || PrismaAll?.PrismaClient
export const prisma = new pc()
and importing it in there from my endpoints.
I’m using adapter_vercel
to deploy to vercel
Any idea what might be the issue here?Mellonaut
03/17/2022, 1:57 PM$lib/prisma.ts
and re-exporting them from there removes the need for importing any part of @prisma/client
in client-side code, and migitates the issue.