反应原生 pod 安装失败与 firebase

时间:2021-05-06 09:17:43

标签: ios react-native cocoapods

当尝试为 react native 项目运行 pod install 时,出现以下错误


[!] Error installing Firebase

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

### Command

C:/Ruby30-x64/bin/pod 安装


### Report

* What did you do?

* What did you expect to happen?

* What happened instead?


### Stack

CocoaPods:1.10.1 红宝石:红宝石 3​​.0.1p64(2021-04-05 修订版 0fb782ee38)[x64-mingw32] RubyGems:3.2.15 主机:无法找到可执行文件(没有这样的文件或目录 - sw_vers)() Xcode : -version) () Git:git 版本 2.23.0.windows.1 Ruby 库目录:C:/Ruby30-x64/lib 存储库:cocoapods - git - https://github.com/CocoaPods/Specs.git @ f587e47de45e30c653e2d258a78c364cbec08bb6


### Plugins

cocoapods-deintegrate : 1.0.4 cocoapods 插件:1.0.0 可可豆搜索:1.0.0 可可豆树干:1.5.0 cocoapods-尝试:1.2.0


### Podfile

```ruby
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '11.0'
source 'https://github.com/CocoaPods/Specs.git'

target 'BankSms' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )

  target 'BankSmsTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.
  use_flipper!()

  post_install do |installer|
    react_native_post_install(installer)
  end
end

错误

Errno::ENOENT - No such file or directory @ dir_s_mkdir - /Caches/CocoaPods/Pods/Release/Firebase/7.11.0-c121f/FirebaseInAppMessaging/Tests/Integration/FunctionalTestApp/ExternalAppExample/fiam-external-ios-testing-app/fiam-external-ios-testing-app/Assets.xcassets/AppIcon.appiconset

如何绕过那个错误??

1 个答案:

答案 0 :(得分:0)

这可能有多种原因。

一直对我有用的一种解决方案是

sudo pod install --allow-root

谢谢!