react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

"'RCTDevMenu.h' file not found" on new installs.

Open nicholasstephan opened this issue 9 years ago • 8 comments

Issue

I'm struggling to get a brand new React Native app with react-native-firebase to build. Following the steps from:

react-native init MyApp

then in the ios directory I pod init with the pod file:

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'MyApp' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Required by RNFirebase
  pod 'Firebase/Core'
  pod 'RNFirebase', :path => '../node_modules/react-native-firebase'

  # [OPTIONAL PODS] - comment out pods for firebase products you won't be using.
  pod 'Firebase/Analytics'
  pod 'Firebase/Auth'
  pod 'Firebase/Database'
  pod 'Firebase/Messaging'

  pod "Yoga", :path => "../node_modules/react-native/ReactCommon/yoga"
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'BatchedBridge', # Required For React Native 0.45.0+
    'Core',
    # Add any other subspecs you want to use in your project
  ]

  target 'MyAppTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

target 'MyApp-tvOS' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for MyApp-tvOS

  target 'MyApp-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

After running pod install, opening MyApp.xcworkspace, and building gives me the error:

/Users/nicholasstephan/code/MyApp/node_modules/react-native/React/Base/RCTTVRemoteHandler.m:25:9: 'RCTDevMenu.h' file not found

Environment

  1. Application Target Platform: iOS
  1. Development Operating System: macOS Sierra 10.12.6
  1. Build Tools: Xcode 8.3.3
  1. React Native version: 0.48.3
  1. RNFirebase Version: 2.2.0
  1. Firebase Module: N/A

nicholasstephan avatar Sep 12 '17 18:09 nicholasstephan

DevSupport add this to React subspecs, then run pod install again. This work for me.

Chenjh1992 avatar Sep 12 '17 20:09 Chenjh1992

Thanks!

But now I'm getting this one:

/Users/nicholasstephan/code/MyApp/node_modules/react-native/third-party/glog-0.3.4/src/base/mutex.h:105:10: 'config.h' file not found

nicholasstephan avatar Sep 13 '17 00:09 nicholasstephan

was having the same issue, added "DevSupport" to subSpecs, now I am getting a whole lot of new errors....

screen shot 2017-09-14 at 7 34 40 pm

noumantahir avatar Sep 14 '17 14:09 noumantahir

@nicholasstephan See: https://github.com/facebook/react-native/issues/14382

designorant avatar Sep 14 '17 22:09 designorant

just tried ios-configure-glog.sh in glog directory, cleaned and built again....

did not fix the problem.....still having same bunch of issues

noumantahir avatar Sep 15 '17 11:09 noumantahir

@noumantahir Quoting Olli from Discord:

Have you tried the good old:

  1. Close xcode
  2. remove xcode derived data, : rm -rf ~/Library/Developer/Xcode/DerivedData/*
  3. remove xworkspace: rm -rf ios/xxx.xcworkspace
  4. remove pod files and lock file rm -rf ios/Pods ios/Podfile.lock
  5. remove build folder rm -rf ios/build/*
  6. re-install pods: cd ios and pod install
  7. react-native run-ios

designorant avatar Sep 15 '17 11:09 designorant

@designorant nope, didn't help, exact same errors as before...thanks for the suggestion though :)

noumantahir avatar Sep 15 '17 19:09 noumantahir

It seems like the original issue has been resolved.

@noumantahir It looks like you might have an out of date version of Firebase. Can you check which version it is using? If it's using 3.X then you need to do the following:

pod outdated - show the pods that are out of date pod update - update pods to the latest versions

chrisbianca avatar Sep 23 '17 15:09 chrisbianca