npm 错误! ERESOLVE 无法解析 React Native 中的依赖树

时间:2021-05-23 16:44:32

标签: reactjs react-native npm

React-native 项目中的错误无法安装包。

错误:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: react-native-svg@12.1.1
npm ERR! node_modules/react-native-svg
npm ERR!   peer react-native-svg@">=6.5.1" from react-native-svg-transformer@0.13.0
npm ERR!   node_modules/react-native-svg-transformer
npm ERR!     react-native-svg-transformer@"0.13.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! react-native-svg-uri@"1.2.3" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react-native-svg@5.5.1
npm ERR! node_modules/react-native-svg
npm ERR!   peer react-native-svg@"^5.3.0" from react-native-svg-uri@1.2.3
npm ERR!   node_modules/react-native-svg-uri
npm ERR!     react-native-svg-uri@"1.2.3" 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\admin\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\admin\AppData\Local\npm-cache\_logs\2021-05-23T15_12_37_450Z-debug.log

0 个答案:

没有答案