Getting the below error after installing @react-native-firebase/auth in my react native project. I am using react native CLI

huangapple go评论70阅读模式
英文:

Getting the below error after installing @react-native-firebase/auth in my react native project. I am using react native CLI

问题

I'll provide a translation for the code-related portion of your message:

在使用npm安装@react-native-firebase/auth后,在我的ios文件夹下运行了pod install。Pod install成功了。但在之后,当我尝试运行npx react-native run-ios时,我遇到了这个错误。

以下是构建失败的构建命令:

CompileC /Users/piupaul/Library/Developer/Xcode/DerivedData/myShare-akplocsikdtwjdftkmfamcyweqnp/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FirebaseAuth.build/Objects-normal/arm64/FIRUser.o /Users/piupaul/Documents/Work/myShare/myShare/ios/Pods/FirebaseAuth/FirebaseAuth/Sources/User/FIRUser.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'FirebaseAuth' from project 'Pods')
英文:

After installing @react-native-firebase/auth with npm, i did pod install under my ios folder. Pod install is successful. But after that when I am trying to run npx react-native run-ios, I am getting this error.

The following build commands failed:
CompileC /Users/piupaul/Library/Developer/Xcode/DerivedData/myShare-akplocsikdtwjdftkmfamcyweqnp/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FirebaseAuth.build/Objects-normal/arm64/FIRUser.o /Users/piupaul/Documents/Work/myShare/myShare/ios/Pods/FirebaseAuth/FirebaseAuth/Sources/User/FIRUser.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'FirebaseAuth' from project 'Pods')

答案1

得分: 2

我昨天遇到了相同的问题,刚刚修复了它。在尝试了多次运行"pod install"、使用"use_modular_headers"和清除"pod cache"后,你的问题启发我尝试移除了"firebase/auth",而它奏效了!应用程序似乎正常,仍然可以使用"RNFB auth"。我没有深入研究原因,但我有一些猜测。但是,这样做有效。如果你能提供重现错误的方法,我们可以尝试帮助你。但是,对我来说似乎这个方法奏效了:

  1. 移除 "@react-native-firebase/app":npm remove @react-native-firebase/app
  2. 移除 "@react-native-firebase/auth":npm remove @react-native-firebase/auth
  3. 进入 ios 目录:cd ios
  4. 运行 "pod install"
  5. 返回上一级目录:cd ..
  6. 运行 "npx react-native run-ios"
英文:

I had the same issue yesterday and just fixed it now. After many attempts doing pod install, use_modular_headers, and clearing out pod cache, it made me try removing firebase/auth based on your question! And it worked! App seems fine and can still use RNFB auth. I haven't deeply researched why but I have assumptions. But hey, it works. If you could provide a way to reproduce the error as well, we could try helping out. But, seems like this worked for me:

  1. npm remove @react-native-firebase/app
  2. npm remove @react-native-firebase/auth
  3. cd ios
  4. pod install
  5. cd ..
  6. npx react-native run-ios

huangapple
  • 本文由 发表于 2023年4月6日 19:59:45
  • 转载请务必保留本文链接:https://go.coder-hub.com/75949278.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定