ReferenceError: Cannot access 'pg' before initialization
Hi everyone,
I love prisma.
I use it with my react-router project, but I recently started to migrate to tanstack start. the project is a monorepo managed with pnpm and turborepo
prisma schema and types are in a shared library called "@myproj/db"
on the tanstack project, it works in development, but when I try to build and preview I see "ReferenceError: Cannot access 'pg' before initialization"
any idea what happens here?
the portion of code that throws the error is this:
I love prisma.
I use it with my react-router project, but I recently started to migrate to tanstack start. the project is a monorepo managed with pnpm and turborepo
prisma schema and types are in a shared library called "@myproj/db"
on the tanstack project, it works in development, but when I try to build and preview I see "ReferenceError: Cannot access 'pg' before initialization"
any idea what happens here?
the portion of code that throws the error is this: