When I run `prisma generate` my prisma/client is g...
# prisma-client
t
When I run
prisma generate
my prisma/client is generated as version 2.21.2 even though I updated my packages. Can't find the issue, would appreciate help 😔 EDIT: My prisma client in the node modules folder is version 2.21.2 even though that version number isn't present anywhere in the package.json or package-lock.json files.
r
@Torrino 👋 Could you delete all
node_modules
and lockfile to install again? I think someone has come up with this before so @janpio might have a better idea.
j
That is pretty weird.
Sometimes
package.json
files in "higher" directories influence what happens in weird ways - so if you have on in a parent folder with that version it could be related.
r
Monorepos?
j
Or just someone being stupid and having a package.json in their user directory (I am talking about meeeee 😄)
But yep, monorepos can be the more common cause - difficult to get right.
💯 1
t
I've managed to fix my issue by first uninstalling prisma and the prisma/client with npm and then, after I saw that I still had the prisma/client version 2.12.2 in my node_modules folder, I manually deleted it and then reinstalled the packages.
Also you could you elaborate that more about monorepos? Are you saying that if my project is too large to be in a single repo that that could've caused this issue?
j
Good you could fix it.
No, a monorepo is a repository where multiple projects are in the same repo usually - a frontend, a backend and so on.
t
Ah okay, then my project is definitely not on a monorepo. Thank you for your replies!
👍 1