简体   繁体   English

获取对等依赖错误反应/反应本机

[英]Getting peer dependency error react/react native

npm ERR: code ERESOLVE npm ERR. npm 错误:代码 ERESOLVE npm 错误。 ERESOLVE could not resolve npm ERR. ERESOLVE 无法解析 npm ERR。 npm ERR: While resolving. npm ERR:正在解决。 react-native@0.70.0 npm ERR. react-native@0.70.0 npm 错误。 Found.成立。 react@18.2.0 npm ERR.反应@18.2.0 npm 错误。 node_modules/react npm ERR.节点模块/反应 npm 错误。 peer react@">=16.3.0" from @callstack/react-theme-provider@3.0.8 npm ERR! peer react@">=16.3.0" 来自@callstack/react-theme-provider@3.0.8 npm 错误! node_modules/@callstack/react-theme-provider npm ERR! node_modules/@callstack/react-theme-provider npm 错误! @callstack/react-theme-provider@"^3.0.7" from react-native-paper@4.12.4 npm ERR! @callstack/react-theme-provider@"^3.0.7" 来自 react-native-paper@4.12.4 npm 错误! node_modules/react-native-paper npm ERR! node_modules/react-native-paper npm 错误! react-native-paper@"^4.12.4" from the root project npm ERR! react-native-paper@"^4.12.4" 来自根项目 npm 错误! peer react@" " from @react-navigation/bottom-tabs@6.3.3 npm ERR. peer react@" " 来自@react-navigation/bottom-tabs@6.3.3 npm ERR。 node_modules/@react-navigation/bottom-tabs npm ERR. node_modules/@react-navigation/bottom-tabs npm ERR。 @react-navigation/bottom-tabs@"^6,3,3" from the root project npm ERR. @react-navigation/bottom-tabs@"^6,3,3" 来自根项目 npm ERR。 23 more (@react-navigation/core. @react-navigation/drawer. :..) npm ERR.还有 23 个(@react-navigation/core.@react-navigation/drawer.:..)npm ERR。 npm ERR. npm 错误。 Could not resolve dependency: npm ERR!无法解决依赖关系:npm ERR! peer react@"18.1.0" from react-native@0.70.0 npm ERR!来自 react-native@0.70.0 的对等 react@"18.1.0" npm 错误! node_modules/react-native npm ERR! node_modules/react-native npm 错误! peer react-native@" " from @react-navigation/bottom-tabs@6.3.3 npm ERR.来自@react-navigation/bottom-tabs@6.3.3 npm ERR 的对等 react-native@" "。 node_modules/@react-navigation/bottom-tabs npm ERR. node_modules/@react-navigation/bottom-tabs npm ERR。 @react-navigation/bottom-tabs@"^6.3.3" from the root project npm ERR! @react-navigation/bottom-tabs@"^6.3.3" 来自根项目 npm 错误! peer react-native@" " from @react-navigation/drawer@6.4.4 npm ERR.来自@react-navigation/drawer@6.4.4 npm ERR 的对等 react-native@""。 node_modules/@react-navigation/drawer npm ERR. node_modules/@react-navigation/drawer npm ERR。 @react-navigation/drawer@"^6,4.4" from the root project npm ERR. @react-navigation/drawer@"^6,4.4" 来自根项目 npm ERR。 15 more (@react-navigation/elements. :..) npm ERR.还有 15 个 (@react-navigation/elements. :..) npm ERR。 npm ERR. npm 错误。 Conflicting peer dependency.冲突的对等依赖。 react@18.1.0 npm ERR!反应@18.1.0 npm 错误! node_modules/react npm ERR!节点模块/反应 npm 错误! peer react@"18.1.0" from react-native@0.70.0 npm ERR!来自 react-native@0.70.0 的对等 react@"18.1.0" npm 错误! node_modules/react-native npm ERR! node_modules/react-native npm 错误! peer react-native@" " from @react-navigation/bottom-tabs@6.3.3 npm ERR.来自@react-navigation/bottom-tabs@6.3.3 npm ERR 的对等 react-native@" "。 node_modules/@react-navigation/bottom-tabs npm ERR. node_modules/@react-navigation/bottom-tabs npm ERR。 @react-navigation/bottom-tabs@"^6.3.3" from the root project npm ERR. @react-navigation/bottom-tabs@"^6.3.3" 来自根项目 npm ERR。 peer react-native@"*" from @react-navigation/drawer@6.4,4 npm ERR.来自@react-navigation/drawer@6.4,4 npm ERR 的对等 react-native@"*"。 node_modules/@react-navigation/drawer npm ERR. node_modules/@react-navigation/drawer npm ERR。 @react-navigation/drawer@"^6.4,4" from the root project npm ERR, 15 more (@react-navigation/elements. ...) npm ERR! @react-navigation/drawer@"^6.4,4" 来自根项目 npm ERR,还有 15 个(@react-navigation/elements....)npm ERR! npm ERR! npm 错误! Fix the upstream dependency conflict, or retry npm ERR!修复上游依赖冲突,或者重试 npm ERR! this command with --force, or --legacy-peer-deps npm ERR!此命令带有 --force 或 --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution.接受不正确的(并且可能被破坏的)依赖解决方案。

System: OS: macOS 12.6 CPU: (8) arm64 Apple M1 Memory: 103.00 MB / 8.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 18.9.0 - /opt/homebrew/bin/node Yarn: Not Found npm: 8.19.1 - /opt/homebrew/bin/npm Watchman: 2022.09.12.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0 Android SDK: Not Found IDEs: Android Studio: 2021.2 AI-212.5712.43.2112.8609683 Xcode: 14.0/14A309 - /usr/bin/xcodebuild Languages: Java: 11.0.12 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: ^17.0.2 => 17.0.2 ZB0DF5BC3B30D492172系统:操作系统:macOS 12.6 CPU:(8) arm64 Apple M1 Memory:103.00 MB / 8.00 GB Shell:5.8.1 - /bin/zsh -0 - 二进制文件:节点:18.9/homebrew。 Found npm: 8.19.1 - /opt/homebrew/bin/npm Watchman: 2022.09.12.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0 Android SDK: Not Found IDEs: Android Studio: 2021.2 AI-212.5712.43.2112.8609683 Xcode: 14.0/14A309 - /usr/bin/xcodebuild Languages: Java: 11.0.12 - /usr/bin/javac npmPackages:@react-native-community/cli:未找到反应:^17.0.2 => 17.0.2 ZB0DF5BC3B30D492172 D8ECAE7FF97BF1Z: 0.68.2 => 0.68.2 react-native-macos: Not Found npmGlobalPackages: react-native : Not Found D8ECAE7FF97BF1Z:0.68.2 => 0.68.2 react-native-macos:未找到 npmGlobalPackages: react-native :未找到

Try to install it with this command npm install --legacy-peer-deps and than start your project again.尝试使用此命令 npm install --legacy-peer-deps 安装它,然后再次启动您的项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM