我正在创建React项目并使用Mantine。当我试图安装@modulz/基图标依赖项时,我会收到存在依赖冲突的错误消息。我该如何解决这个问题?
错误
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: my-mantine-app@0.1.0
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR! react@"^18.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.x || ^17.x" from @modulz/radix-icons@4.0.0
npm ERR! node_modules/@modulz/radix-icons
npm ERR! @modulz/radix-icons@"*" 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! See C:\Users\igorg\AppData\Local\npm-cache\eresolve-report.txt for a full report.发布于 2022-11-09 10:18:55
使用npm install --legacy-peer-deps
https://stackoverflow.com/questions/74372957
复制相似问题