【发布时间】:2022-08-21 16:54:00
【问题描述】:
我正在开发一个 react native 项目,我尝试安装 Font Awesome \"npm i --save @fortawesome/react-native-fontawesome @fortawesome/fontawesome-svg-core react-native-svg\" 使用但我得到了
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: homesick@1.0.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@\"18.0.0\" from react-native@0.69.4
npm ERR! node_modules/react-native
npm ERR! react-native@\"0.69.4\" from the root project
npm ERR! peer react-native@\">= 0.67\" from @fortawesome/react-native-fontawesome@0.3.0
npm ERR! node_modules/@fortawesome/react-native-fontawesome
npm ERR! @fortawesome/react-native-fontawesome@\"*\" 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 /Users/itaylador/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/itaylador/.npm/_logs/2022-08-15T22_50_28_934Z-debug-0.log
我该如何解决这个错误?
标签: react-native npm error-handling font-awesome