英文:
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"。我没有深入研究原因,但我有一些猜测。但是,这样做有效。如果你能提供重现错误的方法,我们可以尝试帮助你。但是,对我来说似乎这个方法奏效了:
- 移除 "@react-native-firebase/app":npm remove @react-native-firebase/app
- 移除 "@react-native-firebase/auth":npm remove @react-native-firebase/auth
- 进入 ios 目录:cd ios
- 运行 "pod install"
- 返回上一级目录:cd ..
- 运行 "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:
- npm remove @react-native-firebase/app
- npm remove @react-native-firebase/auth
- cd ios
- pod install
- cd ..
- npx react-native run-ios
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论