安装react-native-firebase/auth时出错ERESOLVE

3mpgtkmj  于 2023-02-05  发布在  React
关注(0)|答案(1)|浏览(121)

在我的react原生项目中,我想安装React Native Firebase Auth,但在运行以下命令后出现错误:

npm i @react-native-firebase/auth

错误:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: KengTung@0.0.1
npm ERR! Found: @react-native-firebase/app@16.5.1
npm ERR! node_modules/@react-native-firebase/app
npm ERR!   peer @react-native-firebase/app@"16.5.1" from @react-native-firebase/database@16.5.1
npm ERR!   node_modules/@react-native-firebase/database
npm ERR!     @react-native-firebase/database@"^16.5.1" from the root project
npm ERR!   peer @react-native-firebase/app@"16.5.1" from @react-native-firebase/storage@16.5.1
npm ERR!   node_modules/@react-native-firebase/storage
npm ERR!     @react-native-firebase/storage@"^16.5.1" from the root project
npm ERR!   1 more (the root project)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! @react-native-firebase/auth@"*" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @react-native-firebase/app@16.7.0
npm ERR! node_modules/@react-native-firebase/app
npm ERR!   peer @react-native-firebase/app@"16.7.0" from @react-native-firebase/auth@16.7.0
npm ERR!   node_modules/@react-native-firebase/auth
npm ERR!     @react-native-firebase/auth@"*" from the root project
npm ERR!
31moq8wy

31moq8wy1#

试试这个

npm config set legacy-peer-deps true
npm i

相关问题