Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 17159

✖ Installing CocoaPods dependencies fails on M1 Mac with React Native

$
0
0

I get the following error

Searching for inspections failed: undefined method `map' for nil:NilClasserror Installing pods failed. This doesn't affect project initialization and you can safely proceed.However, you will need to install pods manually when running iOS, follow additional steps in "Run instructions for iOS" section.

✖ Installing CocoaPods dependencies (this may take a few minutes)

I then tried going into the iOS Folder and running the following command

bundle install & bundle exec pod install

Generating Pods project――― MARKDOWN TEMPLATE

Command

/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/bin/pod install

Report

  • What did you do?
  • What did you expect to happen?
  • What happened instead?

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 version 2.39.3 (Apple Git-146)Ruby lib dir : /Users/user/.rbenv/versions/2.7.6/libRepositories : trunk - CDN - https://cdn.cocoapods.org/

Plugins

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

Podfile

# Resolve react_native_pods.rb with node to allow for hoistingrequire Pod::Executable.execute_command('node', ['-p','require.resolve("react-native/scripts/react_native_pods.rb",    {paths: [process.argv[1]]},  )', __dir__]).stripplatform :ios, min_ios_version_supportedprepare_react_native_project!# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded## To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`# ```js# module.exports = {#   dependencies: {#     ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),# ```flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabledlinkage = ENV['USE_FRAMEWORKS']if linkage != nil  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green  use_frameworks! :linkage => linkage.to_symendtarget 'reactnativeapp' do  config = use_native_modules!  use_react_native!(    :path => config[:reactNativePath],    # Enables Flipper.    #    # Note that if you have use_frameworks! enabled, Flipper will not work and    # you should disable the next line.    :flipper_configuration => flipper_config,    # An absolute path to your application root.    :app_path => "#{Pod::Config.instance.installation_root}/.."  )  target 'reactnativeappTests' do    inherit! :complete    # Pods for testing  end  post_install do |installer|    # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202    react_native_post_install(      installer,      config[:reactNativePath],      :mac_catalyst_enabled => false    )  endend

Error

LoadError - dlopen(/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/nkf-0.2.0/lib/nkf.bundle, 0x0009): tried: '/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/nkf-0.2.0/lib/nkf.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/nkf-0.2.0/lib/nkf.bundle' (no such file), '/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/nkf-0.2.0/lib/nkf.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')) - /Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/nkf-0.2.0/lib/nkf.bundle/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/nkf-0.2.0/lib/nkf.rb:5:in `require'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/nkf-0.2.0/lib/nkf.rb:5:in `<top (required)>'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/nkf-0.2.0/lib/kconv.rb:13:in `require'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/nkf-0.2.0/lib/kconv.rb:13:in `<top (required)>'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/CFPropertyList-3.0.7/lib/cfpropertylist/rbCFPropertyList.rb:3:in `require'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/CFPropertyList-3.0.7/lib/cfpropertylist/rbCFPropertyList.rb:3:in `<top (required)>'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/CFPropertyList-3.0.7/lib/cfpropertylist.rb:3:in `require'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/CFPropertyList-3.0.7/lib/cfpropertylist.rb:3:in `<top (required)>'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/xcodeproj-1.24.0/lib/xcodeproj/plist.rb:25:in `require'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/xcodeproj-1.24.0/lib/xcodeproj/plist.rb:25:in `read_from_path'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/xcode/xcframework.rb:41:in `initialize'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:518:in `new'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:518:in `load_xcframework'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:746:in `block (3 levels) in <class:PodTargetSettings>'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:746:in `map'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:746:in `block (2 levels) in <class:PodTargetSettings>'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:745:in `each'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:745:in `flat_map'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:745:in `block in <class:PodTargetSettings>'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:120:in `block in define_build_settings_method'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:716:in `block in <class:PodTargetSettings>'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:120:in `block in define_build_settings_method'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:727:in `block in <class:PodTargetSettings>'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:120:in `block in define_build_settings_method'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:698:in `block (2 levels) in <class:PodTargetSettings>'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:698:in `each'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:698:in `flat_map'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:698:in `block in <class:PodTargetSettings>'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:120:in `block in define_build_settings_method'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:395:in `public_send'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:395:in `block in to_h'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:394:in `each'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:394:in `to_h'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:188:in `block in <class:BuildSettings>'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:587:in `block in <class:PodTargetSettings>'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:120:in `block in define_build_settings_method'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/target/build_settings.rb:204:in `save_as'/Users/user/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'/Users/user/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'/Users/user/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 `each'/Users/user/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'/Users/user/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 install!'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/user_interface.rb:149:in `message'/Users/user/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 `install!'/Users/user/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'/Users/user/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'/Users/user/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'/Users/user/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'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/user_interface.rb:149:in `message'/Users/user/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'/Users/user/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!'/Users/user/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'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/user_interface.rb:64:in `section'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:315:in `create_and_save_projects'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:307:in `generate_pods_project'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:183:in `integrate'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:170:in `install!'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/command/install.rb:52:in `run'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/lib/cocoapods/command.rb:52:in `run'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.14.3/bin/pod:55:in `<top (required)>'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/bin/pod:23:in `load'/Users/user/Desktop/reactnativeapp/reactnativeapp/vendor/bundle/ruby/2.7.0/bin/pod:23:in `<top (required)>'/Users/user/.rbenv/versions/2.7.6/lib/ruby/2.7.0/bundler/cli/exec.rb:63:in `load'/Users/user/.rbenv/versions/2.7.6/lib/ruby/2.7.0/bundler/cli/exec.rb:63:in `kernel_load'/Users/user/.rbenv/versions/2.7.6/lib/ruby/2.7.0/bundler/cli/exec.rb:28:in `run'/Users/user/.rbenv/versions/2.7.6/lib/ruby/2.7.0/bundler/cli.rb:476:in `exec'/Users/user/.rbenv/versions/2.7.6/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'/Users/user/.rbenv/versions/2.7.6/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'/Users/user/.rbenv/versions/2.7.6/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'/Users/user/.rbenv/versions/2.7.6/lib/ruby/2.7.0/bundler/cli.rb:30:in `dispatch'/Users/user/.rbenv/versions/2.7.6/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:476:in `start'/Users/user/.rbenv/versions/2.7.6/lib/ruby/2.7.0/bundler/cli.rb:24:in `start'/Users/user/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/libexec/bundle:46:in `block in <top (required)>'/Users/user/.rbenv/versions/2.7.6/lib/ruby/2.7.0/bundler/friendly_errors.rb:123:in `with_friendly_errors'/Users/user/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/libexec/bundle:34:in `<top (required)>'/Users/user/.rbenv/versions/2.7.6/bin/bundle:23:in `load'/Users/user/.rbenv/versions/2.7.6/bin/bundle:23:in `<main>'

――― TEMPLATE END[!] Oh no, an error occurred.Search for existing GitHub issues similar to yours:https://github.com/CocoaPods/CocoaPods/search?q=dlopen%28%2FUsers%2Fuser%2FDesktop%2Freactnativeapp%2Freactnativeapp%2Fvendor%2Fbundle%2Fruby%2F2.7.0%2Fgems%2Fnkf-0.2.0%2Flib%2Fnkf.bundle%2C+0x0009%29%3A+tried%3A+%27%2FUsers%2Fuser%2FDesktop%2Freactnativeapp%2Freactnativeapp%2Fvendor%2Fbundle%2Fruby%2F2.7.0%2Fgems%2Fnkf-0.2.0%2Flib%2Fnkf.bundle%27+%28mach-o+file%2C+but+is+an+incompatible+architecture+%28have+%27x86_64%27%2C+need+%27arm64%27%29%29%2C+%27%2FSystem%2FVolumes%2FPreboot%2FCryptexes%2FOS%2FUsers%2Fuser%2FDesktop%2Freactnativeapp%2Freactnativeapp%2Fvendor%2Fbundle%2Fruby%2F2.7.0%2Fgems%2Fnkf-0.2.0%2Flib%2Fnkf.bundle%27+%28no+such+file%29%2C+%27%2FUsers%2Fuser%2FDesktop%2Freactnativeapp%2Freactnativeapp%2Fvendor%2Fbundle%2Fruby%2F2.7.0%2Fgems%2Fnkf-0.2.0%2Flib%2Fnkf.bundle%27+%28mach-o+file%2C+but+is+an+incompatible+architecture+%28have+%27x86_64%27%2C+need+%27arm64%27%29%29+-+%2FUsers%2Fuser%2FDesktop%2Freactnativeapp%2Freactnativeapp%2Fvendor%2Fbundle%2Fruby%2F2.7.0%2Fgems%2Fnkf-0.2.0%2Flib%2Fnkf.bundle&type=IssuesIf none exists, create a ticket, with the template displayed above, on:https://github.com/CocoaPods/CocoaPods/issues/newBe sure to first read the contributing guide for details on how to properly submit a ticket:https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md


Viewing all articles
Browse latest Browse all 17159

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>