我该如何解决:"Errno::ENOENT - No such file or directory @ rb_sysopen - "?

How do I solve: "Errno::ENOENT - No such file or directory @ rb_sysopen - "?

我正在尝试将 React-Native 合并到 swift 应用程序中。我创建了一个新的 podfile 并添加了所有依赖项。尝试'pod install' 多次后,它仍然无法安装pods。

我已尝试删除 pod 文件夹并再次删除节点文件夹和 运行 'npm install'。我已尝试更新我的 ruby 软件。我在 GitHub 和此处找到的所有似乎适用的内容我都试过了。

   CocoaPods : 1.7.3
        Ruby : ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
    RubyGems : 2.5.2.3
        Host : Mac OS X 10.14.5 (18F132)
       Xcode : 10.2.1 (10E1001)
         Git : git version 2.20.1 (Apple Git-117)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 690c5ee7cf52451dc2c72cde937bc1b92a98cc86

插件

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.1.0
cocoapods-trunk       : 1.3.1
cocoapods-try         : 1.1.0

播客文件

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'LMWPOS' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for LMWPOS
  pod 'Alamofire'
  pod 'AlamofireObjectMapper', '~> 5.0'
  pod 'SwiftyJSON'
  pod 'DLRadioButton'
  pod 'NVActivityIndicatorView'
  pod 'TextFieldEffects'
  pod 'GoogleSignIn'
  pod 'RealmSwift', '~> 3.11.2'
  pod 'NotificationBannerSwift', '~> 1.6.3'
  pod 'MarqueeLabel/Swift', '~> 3.1.6'
  pod 'FBSDKCoreKit', '~> 4.36.0'
  pod 'FBSDKLoginKit', '~> 4.36.0'
  pod 'PromiseKit/Alamofire', '~> 6.0'
  pod 'AlamofireImage'

  # Your 'node_modules' directory is probably in the root of your project,
  # but if not, adjust the `:path` accordingly
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'CxxBridge', # Include this for RN >= 0.47
    'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
    'RCTText',
    'RCTNetwork',
    'RCTWebSocket', # Needed for debugging
    'RCTAnimation', # Needed for FlatList and animations running on native UI thread
    # Add any other subspecs you want to use in your project
  ]
  # Explicitly include Yoga if you are using RN >= 0.42.0
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  # Third party deps podspec link
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

end

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if target.name == "React"
            target.remove_from_project
        end
    end
end

我预计它会安装 pods 并得到了这个:

错误

Errno::ENOENT - No such file or directory @ rb_sysopen - /Users/lmwmarketing/Desktop/LMW-Source-Codes/node_modules/react-native/third-party-podspecs/DoubleConversion.podspec
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:37:in `initialize'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:37:in `open'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:37:in `open'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/external_sources/podspec_source.rb:19:in `block in fetch'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/user_interface.rb:86:in `titled_section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/external_sources/podspec_source.rb:11:in `fetch'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/installer/analyzer.rb:854:in `fetch_external_source'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/installer/analyzer.rb:833:in `block (2 levels) in fetch_external_sources'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/installer/analyzer.rb:832:in `each'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/installer/analyzer.rb:832:in `block in fetch_external_sources'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/installer/analyzer.rb:831:in `fetch_external_sources'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/installer/analyzer.rb:111:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/installer.rb:398:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/installer.rb:221:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/installer.rb:220:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/command/install.rb:51:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'

当它只有一个目录时,所有的节点文件都在搜索两个目录。

  pod 'DoubleConversion', :podspec => './node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => './node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => './node_modules/react-native/third-party-podspecs/Folly.podspec'