当我运行prisma generate
时,我得到:
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: site@0.1.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR! react@"^17.0.2" from the root project
npm ERR! peer react@"^17.0.2" from next@11.1.2
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 react-dom@17.0.1
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:
我试过用——legacy-peer-deps命令,但是它说:
未知或意外选项:——legacy-peer-deps
我没有任何问题安装一切,我没有任何问题运行应用程序。我还删除了node_modules
文件夹&yarn.lock
文件并尝试了新的yarn install --legacy-peer-deps
,但我仍然得到同样的错误。也尝试了前面提到的npm
。现在我不知道我还能做什么了。
npm install @prisma/client
为我修复了它