我在女巫中有一个 React Native 项目,我想添加 native-base。 从 VS 代码“npm install native-base”运行它会抛出这个错误:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: beathey@0.0.1
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR! react@"17.0.1" from the root project
npm ERR! peer react@"*" from native-base@3.0.3
npm ERR! node_modules/native-base
npm ERR! native-base@"*" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"17.0.2" from react-dom@17.0.2
npm ERR! node_modules/react-dom
npm ERR! peer react-dom@"*" from native-base@3.0.3
npm ERR! node_modules/native-base
npm ERR! native-base@"*" 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\juani\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\juani\AppData\Local\npm-cache\_logs\2021-07-07T15_30_01_759Z-debug.log