Wednesday, April 3, 2024
HomeiOS Developmentios - ✖ Putting in CocoaPods dependencies fails on M1 Mac with...

ios – ✖ Putting in CocoaPods dependencies fails on M1 Mac with React Native


I get the next error

Trying to find inspections failed: undefined methodology `map’ for nil:NilClass
error Putting in pods failed. This does not have an effect on venture initialization and you may safely proceed.
Nevertheless, you will have to put in pods manually when operating iOS, comply with extra steps in “Run directions for iOS” part.

✖ Putting in CocoaPods dependencies (this will likely take a couple of minutes)

I then tried going into the iOS Folder and operating the next command

bundle set up & bundle exec pod set up

Producing Pods venture
――― MARKDOWN TEMPLATE

Command

/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/bin/pod set up

Report

  • What did you do?
  • What did you count on to occur?
  • What occurred as a substitute?

Stack

   CocoaPods : 1.14.3
        Ruby : ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a) [arm64-darwin23]
    RubyGems : 3.1.6
        Host : macOS 14.2.1 (23C71)
       Xcode : 15.3 (15E204a)
         Git : git model 2.39.3 (Apple Git-146)
Ruby lib dir : /Customers/consumer/.rbenv/variations/2.7.6/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

Plugins

cocoapods-deintegrate : 1.0.5
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.1
cocoapods-trunk       : 1.6.0
cocoapods-try         : 1.2.0

Podfile

# Resolve react_native_pods.rb with node to permit for hoisting
require Pod::Executable.execute_command('node', ['-p',
  'require.resolve(
    "react-native/scripts/react_native_pods.rb",
    {paths: [process.argv[1]]},
  )', __dir__]).strip
platform :ios, min_ios_version_supported
prepare_react_native_project!
# In case you are utilizing a `react-native-flipper` your iOS construct will fail when `NO_FLIPPER=1` is ready.
# as a result of `react-native-flipper` is determined by (FlipperKit,...) that might be excluded
#
# To repair this you may as well exclude `react-native-flipper` utilizing a `react-native.config.js`
# ```js
# module.exports = {
#   dependencies: {
#     ...(course of.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
  Pod::UI.places "Configuring Pod with #{linkage}ally linked Frameworks".inexperienced
  use_frameworks! :linkage => linkage.to_sym
finish
goal 'reactnativeapp' do
  config = use_native_modules!
  use_react_native!(
    :path => config[:reactNativePath],
    # Allows Flipper.
    #
    # Be aware that if in case you have use_frameworks! enabled, Flipper won't work and
    # it's best to disable the following line.
    :flipper_configuration => flipper_config,
    # An absolute path to your software root.
    :app_path => "#{Pod::Config.occasion.installation_root}/.."
  )
  goal 'reactnativeappTests' do
    inherit! :full
    # Pods for testing
  finish
  post_install do |installer|
    # https://github.com/fb/react-native/blob/predominant/packages/react-native/scripts/react_native_pods.rb#L197-L202
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => false
    )
  finish
finish

Error

LoadError - dlopen(/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/nkf-0.2.0/lib/nkf.bundle, 0x0009): tried: '/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/nkf-0.2.0/lib/nkf.bundle' (mach-o file, however is an incompatible structure (have 'x86_64', want 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/nkf-0.2.0/lib/nkf.bundle' (no such file), '/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/nkf-0.2.0/lib/nkf.bundle' (mach-o file, however is an incompatible structure (have 'x86_64', want 'arm64')) - /Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/nkf-0.2.0/lib/nkf.bundle
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/nkf-0.2.0/lib/nkf.rb:5:in `require'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/nkf-0.2.0/lib/nkf.rb:5:in `<high (required)>'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/nkf-0.2.0/lib/kconv.rb:13:in `require'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/nkf-0.2.0/lib/kconv.rb:13:in `<high (required)>'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/CFPropertyList-3.0.7/lib/cfpropertylist/rbCFPropertyList.rb:3:in `require'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/CFPropertyList-3.0.7/lib/cfpropertylist/rbCFPropertyList.rb:3:in `<high (required)>'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/CFPropertyList-3.0.7/lib/cfpropertylist.rb:3:in `require'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/CFPropertyList-3.0.7/lib/cfpropertylist.rb:3:in `<high (required)>'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/xcodeproj-1.24.0/lib/xcodeproj/plist.rb:25:in `require'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/xcodeproj-1.24.0/lib/xcodeproj/plist.rb:25:in `read_from_path'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/xcode/xcframework.rb:41:in `initialize'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:518:in `new'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:518:in `load_xcframework'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:746:in `block (3 ranges) in <class:PodTargetSettings>'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:746:in `map'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:746:in `block (2 ranges) in <class:PodTargetSettings>'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:745:in `every'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:745:in `flat_map'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:745:in `block in <class:PodTargetSettings>'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:120:in `block in define_build_settings_method'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:716:in `block in <class:PodTargetSettings>'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:120:in `block in define_build_settings_method'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:727:in `block in <class:PodTargetSettings>'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:120:in `block in define_build_settings_method'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:698:in `block (2 ranges) in <class:PodTargetSettings>'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:698:in `every'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:698:in `flat_map'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:698:in `block in <class:PodTargetSettings>'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:120:in `block in define_build_settings_method'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:395:in `public_send'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:395:in `block in to_h'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:394:in `every'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:394:in `to_h'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:188:in `block in <class:BuildSettings>'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:587:in `block in <class:PodTargetSettings>'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:120:in `block in define_build_settings_method'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/goal/build_settings.rb:204:in `save_as'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/installer/xcode/pods_project_generator/target_installer_helper.rb:24:in `update_changed_file'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:644:in `block in create_xcconfig_file'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:642:in `every'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:642:in `create_xcconfig_file'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:71:in `block in set up!'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/user_interface.rb:149:in `message'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:40:in `set up!'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:115:in `block in install_pod_targets'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:112:in `map'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:112:in `install_pod_targets'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/installer/xcode/single_pods_project_generator.rb:32:in `block in install_all_pod_targets'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/user_interface.rb:149:in `message'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/installer/xcode/single_pods_project_generator.rb:31:in `install_all_pod_targets'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/installer/xcode/single_pods_project_generator.rb:19:in `generate!'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:320:in `block in create_and_save_projects'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/user_interface.rb:64:in `part'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:315:in `create_and_save_projects'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:307:in `generate_pods_project'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:183:in `combine'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:170:in `set up!'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/command/set up.rb:52:in `run'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/command.rb:52:in `run'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/bin/pod:55:in `<high (required)>'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/bin/pod:23:in `load'
/Customers/consumer/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/bin/pod:23:in `<high (required)>'
/Customers/consumer/.rbenv/variations/2.7.6/lib/ruby/2.7.0/bundler/cli/exec.rb:63:in `load'
/Customers/consumer/.rbenv/variations/2.7.6/lib/ruby/2.7.0/bundler/cli/exec.rb:63:in `kernel_load'
/Customers/consumer/.rbenv/variations/2.7.6/lib/ruby/2.7.0/bundler/cli/exec.rb:28:in `run'
/Customers/consumer/.rbenv/variations/2.7.6/lib/ruby/2.7.0/bundler/cli.rb:476:in `exec'
/Customers/consumer/.rbenv/variations/2.7.6/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Customers/consumer/.rbenv/variations/2.7.6/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/Customers/consumer/.rbenv/variations/2.7.6/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
/Customers/consumer/.rbenv/variations/2.7.6/lib/ruby/2.7.0/bundler/cli.rb:30:in `dispatch'
/Customers/consumer/.rbenv/variations/2.7.6/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:476:in `begin'
/Customers/consumer/.rbenv/variations/2.7.6/lib/ruby/2.7.0/bundler/cli.rb:24:in `begin'
/Customers/consumer/.rbenv/variations/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/libexec/bundle:46:in `block in <high (required)>'
/Customers/consumer/.rbenv/variations/2.7.6/lib/ruby/2.7.0/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/Customers/consumer/.rbenv/variations/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/libexec/bundle:34:in `<high (required)>'
/Customers/consumer/.rbenv/variations/2.7.6/bin/bundle:23:in `load'
/Customers/consumer/.rbenv/variations/2.7.6/bin/bundle:23:in `<predominant>'

――― TEMPLATE END
[!] Oh no, an error occurred.
Seek for current GitHub points just like yours:
https://github.com/CocoaPods/CocoaPods/search?q=dlopenpercent28percent2FUserspercent2Fuserpercent2FDesktoppercent2Freactnativeapppercent2Freactnativeapppercent2Fvendorpercent2Fbundlepercent2Frubypercent2F2.7.0percent2Fgemspercent2Fnkf-0.2.0percent2Flibpercent2Fnkf.bundlepercent2C+0x0009percent29percent3A+triedpercent3A+%27percent2FUserspercent2Fuserpercent2FDesktoppercent2Freactnativeapppercent2Freactnativeapppercent2Fvendorpercent2Fbundlepercent2Frubypercent2F2.7.0percent2Fgemspercent2Fnkf-0.2.0percent2Flibpercent2Fnkf.bundlepercent27+%28mach-o+filepercent2C+however+is+an+incompatible+structure+%28have+%27x86_64percent27percent2C+want+%27arm64percent27percent29percent29percent2C+%27percent2FSystempercent2FVolumespercent2FPrebootpercent2FCryptexespercent2FOSpercent2FUserspercent2Fuserpercent2FDesktoppercent2Freactnativeapppercent2Freactnativeapppercent2Fvendorpercent2Fbundlepercent2Frubypercent2F2.7.0percent2Fgemspercent2Fnkf-0.2.0percent2Flibpercent2Fnkf.bundlepercent27+%28no+such+filepercent29percent2C+%27percent2FUserspercent2Fuserpercent2FDesktoppercent2Freactnativeapppercent2Freactnativeapppercent2Fvendorpercent2Fbundlepercent2Frubypercent2F2.7.0percent2Fgemspercent2Fnkf-0.2.0percent2Flibpercent2Fnkf.bundlepercent27+%28mach-o+filepercent2C+however+is+an+incompatible+structure+%28have+%27x86_64percent27percent2C+want+%27arm64percent27percent29percent29+-+%2FUserspercent2Fuserpercent2FDesktoppercent2Freactnativeapppercent2Freactnativeapppercent2Fvendorpercent2Fbundlepercent2Frubypercent2F2.7.0percent2Fgemspercent2Fnkf-0.2.0percent2Flibpercent2Fnkf.bundle&kind=Points
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/points/new
Be sure you first learn the contributing information for particulars on the best way to correctly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/grasp/CONTRIBUTING.md



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments