-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Closed
Copy link
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.tech/typescriptIssue for tech TypeScript.Issue for tech TypeScript.topic: @prisma/nextjs-monorepo-workaround-plugintopic: Next.jstopic: bundlertopic: monorepotopic: webpack
Description
Bug description
@prisma/nextjs-monorepo-workaround-plugin
is not able to handle multiple generated clients in a monorepo setup, which are then most commonly bundled together via a Next.js app. The current logic poorly attempts to manage multiple schemas, and thus ends up updating the paths to only one schema across all the bundled clients. This obviously does not work and leads to various errors depending on how much the two schemas differ.
#12853 (comment)
#12921 (comment)
#17687 (comment)
#17687 (comment)
How to reproduce
https://github.com/trentonsnyder/nextjs-prisma-repro (thanks @trentonsnyder)
Expected behavior
Multiple schemas can be handled without any issue when multiple clients are bundled.
Prisma information
n/a
Environment & setup
- OS: n/a
- Database: n/a
- Node.js version: n/a
Prisma Version
4.11.0-dev
paulm17, relsunkaev, makeeno, michal-billtech, muradbu and 70 morecodemileRioChndr, rclmenezes and Yhozen
Metadata
Metadata
Assignees
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.tech/typescriptIssue for tech TypeScript.Issue for tech TypeScript.topic: @prisma/nextjs-monorepo-workaround-plugintopic: Next.jstopic: bundlertopic: monorepotopic: webpack