0

When I run prisma generate I get:

Prisma schema loaded from prisma/schema.prisma
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"^17.0.2" from the root project
npm ERR!   peer react@"^17.0.2" from [email protected]
npm ERR!   node_modules/next
npm ERR!     next@"^11.1.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"17.0.1" from [email protected]
npm ERR! node_modules/react-dom
npm ERR!   react-dom@"17.0.1" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 

npm ERR! A complete log of this run can be found in:

I have tried the command with --legacy-peer-deps, but it says:

unknown or unexpected option: --legacy-peer-deps

I don't have any problems installing everything, I don't have any problems running the app. I also deleted the node_modules folder & yarn.lock file and tried a new yarn install --legacy-peer-deps but I'm still getting the same error. Also tried the aforementioned with npm. Now not sure what I could do anymore.

1
  • This likely doesn't have anything to do with Prisma generate. It's possible that when you run the command, npm can't seem to find the prisma cli in your project, so it attempts to install it and runs into the dependency issue. Could you check if both prisma or "@prisma/client" exists in your package.json and are available in node_modules? Commented Sep 27, 2021 at 13:07

1 Answer 1

1

npm install @prisma/client fixed it for me

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.