温馨提示:本文翻译自stackoverflow.com,查看原文请点击:swift - How do I solve: "Errno::ENOENT

swift - 我该如何解决:“ Errno :: ENOENT

发布于 2020-03-27 10:50:44

我正在尝试将React-Native合并到一个快速的应用程序中。我创建了一个新的podfile并添加了所有依赖项。尝试多次“ pod安装”后,仍然不会安装Pod。

我想删除podfolder,也删除节点文件夹,然后再次运行'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

我希望它可以安装吊舱并得到以下信息:

错误

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>'

查看更多

查看更多

提问者
Elias Wood
被浏览
55
Elias Wood 2019-07-03 22:03

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

  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'

发布
问题

分享
好友

手机
浏览

扫码手机浏览