-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Investigate Prisma issues due to client being generated in the api workspace #4605
Comments
I can confirm this is also happening with yarn 3. I just created a brand new redwoodJS app, and ran into this problem as well. |
I'm doing the tutorial and ran into this problem at Getting Dynamic after |
@lyonusi Gah, that's so frustrating. So sorry. This is a particularly annoying bug... 😖 UpdatePrisma is moving forward with a fix. The tests on a pre-release version are looking good here #4850 Need to wait for a Prisma patch or minor release, then we'll get this merged into a Redwood release. Soon! |
Closed by I'll patch RC and release |
Prisma throws errors when trying to access models, in the seed scripts, exec scripts or services.
Diagnosis
Looks like in yarn 1 workspaces, sometimes prisma will create the .prisma folder at one or more of the nested workspaces. Deleting the generated folder fixes the problem
So the migrations and generation produces the client in the root
node_modules/.prisma
but when running the api side code, 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)
Tasks
Prisma 3.9.x+ multiple clients being generated, and in the wrong Yarn 1 workspace prisma/prisma#12083
Last known working version (in Redwood world) - Prisma 3.8.1 (Redwood v0.42.1)
The text was updated successfully, but these errors were encountered: