Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'React/RCTEventEmitter.h' file not found - RN 0.43.2 #13371

Closed
tsui-david opened this issue Apr 7, 2017 · 21 comments
Closed

'React/RCTEventEmitter.h' file not found - RN 0.43.2 #13371

tsui-david opened this issue Apr 7, 2017 · 21 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@tsui-david
Copy link

tsui-david commented Apr 7, 2017

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
@guangmingzizai
Copy link

Same issue.

@giordy
Copy link

giordy commented Apr 7, 2017

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.

@tsui-david
Copy link
Author

I have seen and done the procedure before. It has not worked for me still :/
I tried adding the scheme in the order you described but it has also not worked.
It seems my RCTLinking is still broken because I still get:
'React/RCTEventEmitter.h' file not found in xcode

@guangmingzizai
Copy link

I solved this problem yesterday with:

  1. Replace all #import "RCT*.h" with #import <React/RCT*.h>.
  2. Since I have used CocoaPods, my RN native modules in Pods still had errors. I haven't found the solution, so I moved my RN native modules from Pods to project, it works.

Ensure your have unchecked Parallelize Build and removed all react-native related header search paths from all targets.

@alxvallejo
Copy link

@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?

@hramos
Copy link
Contributor

hramos commented Jul 31, 2017

Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!

If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:

  • Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
  • If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
  • Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.

If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.

@hramos hramos added the Icebox label Jul 31, 2017
@hramos hramos closed this as completed Jul 31, 2017
@typehorror
Copy link

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

@hramos
Copy link
Contributor

hramos commented Aug 4, 2017

@Debrice that's entirely possible. See my last comment for next steps.

@hugoh59
Copy link

hugoh59 commented Jan 17, 2018

Facing the same issue with the latest version of React Native.

@timsatterfield
Copy link

+1

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

@jasdeepsingh
Copy link

jasdeepsingh commented Jan 24, 2018

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

@jdnichollsc
Copy link

jdnichollsc commented Jan 25, 2018

Same issue on Mac:

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

@Neuroforge
Copy link

Neuroforge commented Jan 31, 2018

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.... #12042 (comment)

Also, i've tried the following from this link.... (#12042 (comment))

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

@gramster
Copy link

Same issue
react: 16.2.0
react-native:0.53.2
MacOS: 10.13.3
XCode: 9.2

@ideasownersco
Copy link

same issue

@ghost
Copy link

ghost commented Mar 12, 2018

same issue
any solution yet?

@ghost
Copy link

ghost commented Mar 12, 2018

hi there,

fyi: react-native upgrade did the job for me 👍

@zedtux
Copy link
Contributor

zedtux commented Jun 11, 2018

I'm having this issue with React-Native 0.55 and Calabash from the -cal target (while the non -cal target compiles just fine).

@syntag
Copy link

syntag commented Jul 2, 2018

I fixed this issue by manually linking RNBackgroundFetch and React to XCode and upgrading my React to 16.4.1.

@david0u0
Copy link

david0u0 commented Jul 4, 2018

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...

@acomito
Copy link

acomito commented Jul 10, 2018

I had this crop up when I added react-native-sentry

@facebook facebook locked as resolved and limited conversation to collaborators Jul 31, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests