Turborepo with Prisma Not Working in Local Dev

62 Views Asked by At

I have a monorepo through Turborepo, and it has a nested apps folder. Each app has it's own schema.prisma that define the db for each app. This builds just fine in all other areas, but it will end up building the initial app on localhost:5173 primsa client and using that for each app in dev. This builds just fine on Vercel, but a bit confused why there is an issue with just local dev on this.

E.g) App2 on localhost:5174 will reference a table on localhost:5173 App1.

Here is my app structure:

monorepo
    |
    |_______apps
             |
        _____|______
       |            |
      app1         app2
/schema.prisma     /schema.prisma

My stack includes 2 Sveltekit apps with pnpm, Prisma, and Planetscale.

I've tried to generate an output for each app in a ./generated dir, and node modules as a few Github Issues suggested. However, none of the mentioned worked in producing a different result.

0

There are 0 best solutions below