You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

RNFBAppModule原生模块找不到错误求助(React Native iOS环境)

问题:Native module RNFBAppModule 找不到报错排查

报错信息

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

已尝试的操作

  • 按照React Native Firebase官方建议修改Podfile,补充Firebase相关依赖配置
  • 在Podfile中指定RNFBApp模块路径
  • 执行pod install --repo-update
  • 删除Podfile.lock和Pods目录后重新执行安装

问题仍未解决,请求协助排查。


内容的提问来源于stack exchange,提问作者kursad

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.16 09:05:06