-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prisma 3.9.x+ multiple clients being generated, and in the wrong Yarn 1 workspace #12083
Comments
I can confirm the behavior that @dac09 describes here, I tried it via his Gitpod reproduction before. |
Confirming that this also happens on Prisma v3.9.2 |
Last known working version (in Redwood world) - Prisma 3.8.1 @millsp hope this helps! ✌️ |
Hi @janpio Just checking in here as this little 🐛 keeps popping up for devs. Anything else we could help with at this point? |
Hey @thedavidprice we will work on this coming sprint (starting on 15/03), at this stage everything looks clear to me. Thanks for taking the time doing the investigation @dac09! I'll make sure to add an E2E test for Yarn 1 + Workspaces to avoid any regression in the future. |
@millsp Thank you so much! So you have transparency with our timeline, we are targeting March 21 for a "final" v1-rc, with stable v1 to follow within a couple of weeks. This is one of the last remaining issues on my radar — not meant to imply pressure but just so you know why I'm watching it more closely 😆 |
Bug description
In yarn 1 workspaces, sometimes prisma will create the .prisma folder at one or more of the nested workspaces' node_modules.
Migrations and generation produces the client in the root
node_modules/.prisma
but when running inside a workspace, it picks a different prisma client, causing this errorIn our case:
Node version: v16.13.1
Yarn version: 1.23.0-20220130.1630 (set using yarn version classic)
How to reproduce
Reproduction is in this repo here:
Steps to reproduce:
and then
And you should see:
Expected behavior
Prisma should only generate client at root of the workspace, not in nested workspaces.
Prisma information
Schema: https://github.com/dac09/prisma-multiple-clients-repro/blob/main/api/db/schema.prisma
Query: https://github.com/dac09/prisma-multiple-clients-repro/blob/main/api/src/services/posts/posts.ts#L6
Environment & setup
Prisma Version
Mirrored Redwood Issue
redwoodjs/redwood#4605
The text was updated successfully, but these errors were encountered: