Anyone who have implemented prisma as a package in...
# orm-help
k
Anyone who have implemented prisma as a package in a monorepo? I have an
apps/
and a
packages/
folder. In
apps/core-api
, I'm using
packages/db
, which includes an index file that does
export * from "@prisma/client@
. I'm however having trouble if important this re-export of prisma client. I get
the requested module does not export a module named  PrismaClient
or
no default exports from @prisma/client
when trying to use default import. I'm running a monorepo with yarn workspace 3 and I do think that there might be a problem of finding the types? I'm not sure what to do. Would love an example. I'm also running full esm with
nodemon --exec 'node --loader ts-node/esm --experimental-specifier-resolution=node src/index.ts'
as my run command.
Never mind. Got it to work by writing
Copy code
export * from "@prisma/client"
export * from ".prisma/client"
In index.ts
n
Glad that this is solved! 🙌