react-native: 'React/RCTEventEmitter.h' file not found - RN 0.43.2

Description

  1. Initialized new react native project following the react native getting started.
  2. Encounter failed build with the error within terminal: 'React/RCTEventEmitter.h' file not found

Reproduction Steps and Sample Code

react-native init AwesomeProject cd AwesomeProject react-native run-ios

Result: fatal error: 'React/RCTEventEmitter.h' file not found

–Running in XCode– image

Additional Information

  • React Native version: 0.43.2 (latest)
  • Platform: iOS
  • Development Operating System: macOS Sierra v10.12.4 (latest)
  • Dev tools: XCode v8.3.1 (latest)
  • Build Options on Xcode (default) image

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 12
  • Comments: 21 (3 by maintainers)

Most upvoted comments

@hramos I just endup on that thread because I’m facing this issue. It might not be dead

I confirm I’m gettting it too unfortunately. I’m using React Native 0.43.2 too

EDIT: for me this procedure solved the issue. Very strange heisenbug 😐

EDIT 2: the procedure I linked made it possible for me to build the project but archive is still failing :\

EDIT 3: I finally managed to make archive work by editing the “scheme” and adding, in order:

  • React
  • RCTLinking
  • RCTActionSheet
  • MyProject

and also I had to disable the “Parallelize Build” option. I hope this can be useful to someone.

Same issue on mac with Xcode Version 9.2 (9C40b)

Same error, different file!

screen shot 2018-02-01 at 10 28 15 am

This procedure did not work for me… https://github.com/facebook/react-native/issues/12042#issuecomment-275025960

Also, i’ve tried the following from this link… (https://github.com/facebook/react-native/issues/12042#issuecomment-275025960)

To solve the issue, you have to do the following:

In Xcode, go to the project scheme (Product -> Scheme -> Manage Scheme -> double click your project). Click on the ‘Build’ option at the left pane. Uncheck ‘Parallelize Build’ under Build Options. Then in Targets section, click ‘+’ button then search for ‘React’. Select it and click ‘Add’. ‘React’ should now appear under Targets section. Click and drag it to the top so that it will be the first item in the list (before your project). Clean the project and build.

However, i could only get to this part where React was grayed out… 😕

screen shot 2018-02-01 at 10 29 27 am

My project is now just dead in the water. 😕

react-native-cli: 2.0.1 react-native: 0.50.3 Osx: 10.13.3 Xcode: 9.2

Having the same issue, any help would be highly appreciated? Anyone?

react-native-cli: 2.0.1
react-native: 0.52.1
osx: 10.13.2
xcode: 9.2

Still getting the problem with RN 0.55. Even stranger, the issue doesn’t heappen all the time. Sometimes (after desperately re-clicking the archive button) I can get the job done. This only effects the archive function…

Same issue on Mac:

react-native-cli: 2.0.1
react-native: 0.52.1

@guangmingzizai The documentation for Firebase says to use react-native as one of the header search paths. Can you explain why you’re removing them?