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

Build Failed on iOS #46

Closed
siwymilek opened this issue Jan 21, 2016 · 11 comments
Closed

Build Failed on iOS #46

siwymilek opened this issue Jan 21, 2016 · 11 comments

Comments

@siwymilek
Copy link

There is an error: 'RCTBridgeModule.h' file not found.

@iSimar
Copy link

iSimar commented Jan 11, 2017

getting this problem, any solution?

@timbuckley
Copy link

@siwymilek Any clue how you solved this would be really appreciated!

@igolden
Copy link

igolden commented Jan 14, 2017

I too recently got this error for no apparent reason. Checking versions, build paths, etc.. no luck yet. Prevented builds for over a day now.

@cjdell
Copy link
Collaborator

cjdell commented Jan 15, 2017

I had this occur with the test app last night after an upgrade. I solved it by making sure the "Build Settings" -> "Header Search Paths" was set to include the React library. You should have this entry:

$(SRCROOT)/../node_modules/react-native/React - (Recursive)

You might also be able to fix it by removing and re-adding the reference to library, but that didn't work for me. Hope this helps.

@cjdell cjdell reopened this Jan 15, 2017
@iSimar
Copy link

iSimar commented Jan 15, 2017

@cjdell Just tried including that in the "Build Settings" -> "Header Search Paths". Unfortunately, no luck :(

@cjdell
Copy link
Collaborator

cjdell commented Jan 15, 2017

@iSimar Did you do it for both Project and Target (in the sidebar)? They are actually two separate configurations (not sure why). Failing that, you could try a reinstall of the react-native module.

@iSimar
Copy link

iSimar commented Jan 15, 2017

Think i found the fix, no need to change "Header Search Paths".

PR created:
#238

Also discussed this issue on stackoverflow:
http://stackoverflow.com/a/41664041/3152113

Update: Yupe, works on iOS now.

@Tritlo
Copy link

Tritlo commented Jan 16, 2017

I am having the same issue. No luck with the Header Search Paths. #238 fixed the issue for me when I applied it manually.

@igolden
Copy link

igolden commented Jan 18, 2017

#238 worked for me when I implemented it manually, but it just didn't feel comfortable editing a module i don't support.

Eventually I fixed it without modifying the RNFS package by doing the following:

  1. Checked my react-native version. I was running 0.33.0 (default installed by CLI). So I upgraded to 0.36.0. (also tried 0.40.0, but there's a library import change on that build)

  2. I removed all files in ios/* and deleted node_modules. Then I ran npm install && react-native upgrade which installed my upgraded react-native package.

  3. I ran react-native link and I was up and running.

Funny enough, when I popped into the app this morning it threw the error again, but when I ran through the steps above it fixed it for me. Still feel like there's a better solution out there.

@vspedr
Copy link

vspedr commented Jan 18, 2017

TLDR: check your installed dependencies if you're using version 2.0.1-rc.x

Hey guys, I was having the same problem in a project which currently uses RN 0.32.
After clean installing my dependencies, I noticed the build was failing on XCode. So I looked at my package.json and saw "react-native-fs": "^2.0.1-rc.2". Then I ran npm ls react-native-ls and noticed the actual installed version was 2.0.1-rc.3, which introduces the library import change that was breaking the build. So I did the following:

  • removed the ^ from that line in package.json to force it to install rc.2
  • clean install node_modules
  • on XCode, Product -> Clean then Build again...

And it worked!

@timbuckley
Copy link

@vspedr Indeed, we performed the same action and that solved the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants