iosreact-nativepodfile

Error: Native module RNFBAppModule not found. Re-check module install, linking, configuration, build and install steps., js engine: hermes


Package.json

"dependencies": {
    "@react-native-async-storage/async-storage": "^2.0.0",
    "@react-native-firebase/app": "^21.4.0",
    "@react-native-firebase/auth": "^21.4.0",
    "@react-native-firebase/firestore": "^21.4.0",
    "@react-navigation/bottom-tabs": "^6.5.0",
    "@react-navigation/native": "^6.1.0",
    "@react-navigation/native-stack": "^6.9.0",
    "axios": "^1.7.7",
    "firebase": "^11.0.1",
    "react": "18.3.1",
    "react-native": "0.75.4",
    "react-native-calendars": "^1.1307.0",
    "react-native-get-random-values": "^1.11.0",
    "react-native-paper": "^5.12.5",
    "react-native-safe-area-context": "^4.11.1",
    "react-native-screens": "^4.0.0",
    "react-native-svg": "^15.8.0",
    "react-native-vector-icons": "^10.2.0",
    "react-native-video": "^6.7.0",
    "react-native-webview": "^13.12.3",
    "uuid": "^11.0.2"
  },

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, '14.0'  
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 'app' do
  use_frameworks! :linkage => :static
  $RNFirebaseAsStaticFramework = true

  config = use_native_modules!


  use_modular_headers!
  pod 'RNFBApp', path: '../node_modules/@react-native-firebase/app'
  pod 'FirebaseCore', :modular_headers => true
  pod 'FirebaseCoreExtension', :modular_headers => true
  pod 'FirebaseInstallations', :modular_headers => true
  pod 'GoogleDataTransport', :modular_headers => true
  pod 'GoogleUtilities', :modular_headers => true
  pod 'nanopb', :modular_headers => true
  use_react_native!(
    :path => config[:reactNativePath],
   
    :hermes_enabled => true,
    :fabric_enabled => true,
   
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  

  target 'apptest' 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,
     
    )

   
    
  end
end

I made some additions to my Podfile as recommended on the React Native Firebase website. I noticed that some Firebase files were missing, so I added them. However, despite providing the path for the RNFBApp module, it still appears to be missing. I have tried running pod install --repo-update and deleting the Podfile.lock and Pods directory before reinstalling, but this issue persists.


Solution

  • I encountered the same issue after installing @react-native-firebase/app version 21.4.0. To resolve it, I downgraded @react-native-firebase/app, @react-native-firebase/auth, and @react-native-firebase/firestore to version 19.0.0. After the downgrade, everything worked fine for me.