XCode unable to build React-Native project

I’m trying to build my React Native app for iOS but I am running into some issues. For starters, here’s my package.json file:

{
  "name": "MyRNApp",
  "version": "1.7.0",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "lint": "eslint .",
    "start": "react-native start",
    "test": "jest"
  },
  "dependencies": {
    "@apollo/client": "^3.11.4",
    "@notifee/react-native": "^7.8.2",
    "@react-native-async-storage/async-storage": "^1.24.0",
    "@react-native-clipboard/clipboard": "^1.13.0",
    "@react-native-community/blur": "^4.4.0",
    "@react-native-community/checkbox": "^0.5.17",
    "@react-native-community/datetimepicker": "^8.2.0",
    "@react-native-community/geolocation": "^3.3.0",
    "@react-native-firebase/app": "^20.3.0",
    "@react-native-firebase/messaging": "^20.3.0",
    "@react-native-google-signin/google-signin": "^12.2.1",
    "@react-navigation/bottom-tabs": "^6.6.0",
    "@react-navigation/drawer": "^6.7.0",
    "@react-navigation/elements": "^1.3.31",
    "@react-navigation/material-top-tabs": "^6.6.14",
    "@react-navigation/native": "^6.1.17",
    "@react-navigation/native-stack": "^6.10.0",
    "@react-navigation/stack": "^6.4.1",
    "@tanstack/react-query": "^5.50.1",
    "@twotalltotems/react-native-otp-input": "^1.3.11",
    "axios": "^1.7.2",
    "datetimepicker": "^0.1.39",
    "graphql": "^16.9.0",
    "i18next": "^23.12.2",
    "lottie-react-native": "^6.7.2",
    "react": "18.2.0",
    "react-i18next": "^15.0.0",
    "react-native": "0.74.3",
    "react-native-android-location-enabler": "^2.0.1",
    "react-native-animatable": "^1.4.0",
    "react-native-calendars": "^1.1306.0",
    "react-native-dotenv": "^3.4.11",
    "react-native-elements": "^3.4.3",
    "react-native-gesture-handler": "^2.18.0",
    "react-native-get-location": "^4.0.1",
    "react-native-image-picker": "^7.1.2",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-keychain": "^8.2.0",
    "react-native-linear-gradient": "^2.8.3",
    "react-native-pager-view": "^6.3.3",
    "react-native-paper": "^5.12.3",
    "react-native-ratings": "^8.1.0",
    "react-native-raw-bottom-sheet": "^3.0.0",
    "react-native-reanimated": "^3.14.0",
    "react-native-responsive-screen": "^1.4.2",
    "react-native-safe-area-context": "^4.10.8",
    "react-native-screens": "^3.32.0",
    "react-native-size-matters": "^0.4.2",
    "react-native-svg": "^15.4.0",
    "react-native-svg-transformer": "^1.5.0",
    "react-native-tab-view": "^3.5.2",
    "react-native-vector-icons": "^10.1.0",
    "socket.io-client": "^4.7.5",
    "zustand": "^4.5.4"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native/babel-preset": "0.74.85",
    "@react-native/eslint-config": "0.74.85",
    "@react-native/metro-config": "0.74.85",
    "@react-native/typescript-config": "0.74.85",
    "@types/react": "^18.2.6",
    "@types/react-native-check-box": "^2.1.6",
    "@types/react-native-vector-icons": "^6.4.18",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.6.3",
    "eslint": "^8.57.0",
    "jest": "^29.6.3",
    "prettier": "2.8.8",
    "react-test-renderer": "18.2.0",
    "typescript": "5.0.4"
  },
  "engines": {
    "node": ">=18"
  }
}

And here’s the Podfile:

# Resolve react_native_pods.rb with node to allow 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!

linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
  use_frameworks! :linkage => linkage.to_sym
end

target 'MyRNApp' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  target 'MyRNAppTests' 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,
      # :ccache_enabled => true
    )
  end
end

When I do pod install I get this error:

[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod `FirebaseCoreInternal` depends upon `GoogleUtilities`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.

If I try to add the line use_modular_headers!, I am able to do pod install but when I run the project in XCode and build it, I get this error:

/Users/myuser/Library/Developer/Xcode/DerivedData/MyRNApp-bbxbgmmqpwnecedpcqqamjhrxvpq/Build/Intermediates.noindex/MyRNApp.build/Debug-iphoneos/MyRNApp.build/DerivedSources/MyRNApp.c module map file '/Users/myuser/Library/Developer/Xcode/DerivedData/MyRNApp-bbxbgmmqpwnecedpcqqamjhrxvpq/Build/Products/Debug-iphoneos/FirebaseCoreInternal/FirebaseCoreInternal.modulemap' not found

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật