react-native: RCTConvert.h yoga/Yoga.h file not found
I am logging this as a bug as it seems like a bunch of people have logged it as an issue on Stackoverflow … but seems to be a bug http://stackoverflow.com/questions/41505616/yoga-yoga-h-header-file-not-found-after-react-native-integration-in-the-existing
Upgraded to latest react-native 0.4.0
Build project for iOS on Xcode and you get the error message: /Users/adamginsburg/Documents/development/buzzy9/node_modules/react-native/React/Base/RCTConvert.h:13:9: 'yoga/Yoga.h' file not found
- React Native version: 0.4.0
- Platform: iOS
- Operating System: The build issue happen on XCode 8
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 45
- Comments: 88 (22 by maintainers)
Commits related to this issue
- Make podspec great again. Summary: Fixes #11272 Fixes #11572 Fixes #11781 The main changes here are: * This depends on the latest CocoaPods (1.2.0). It’s currently in RC, but if I’m not mistaken a ... — committed to nicktate/react-native by alloy 7 years ago
- Make podspec great again. Summary: Fixes #11272 Fixes #11572 Fixes #11781 The main changes here are: * This depends on the latest CocoaPods (1.2.0). It’s currently in RC, but if I’m not mistaken a ... — committed to nicktate/react-native by alloy 7 years ago
- Make podspec great again. Summary: Fixes #11272 Fixes #11572 Fixes #11781 The main changes here are: * This depends on the latest CocoaPods (1.2.0). It’s currently in RC, but if I’m not mistaken a ... — committed to nicktate/react-native by alloy 7 years ago
- Make podspec great again. Summary: Fixes #11272 Fixes #11572 Fixes #11781 The main changes here are: * This depends on the latest CocoaPods (1.2.0). It’s currently in RC, but if I’m not mistaken a ... — committed to nicktate/react-native by alloy 7 years ago
- Make podspec great again. Summary: Fixes #11272 Fixes #11572 Fixes #11781 The main changes here are: * This depends on the latest CocoaPods (1.2.0). It’s currently in RC, but if I’m not mistaken a ... — committed to alloy/react-native by alloy 7 years ago
- Make podspec great again. Summary: Fixes #11272 Fixes #11572 Fixes #11781 The main changes here are: * This depends on the latest CocoaPods (1.2.0). It’s currently in RC, but if I’m not mistaken a ... — committed to nicktate/react-native by alloy 7 years ago
- Make podspec great again. Summary: Fixes #11272 Fixes #11572 Fixes #11781 The main changes here are: * This depends on the latest CocoaPods (1.2.0). It’s currently in RC, but if I’m not mistaken a ... — committed to facebook/react-native by alloy 7 years ago
- Make podspec great again. Summary: Fixes #11272 Fixes #11572 Fixes #11781 The main changes here are: * This depends on the latest CocoaPods (1.2.0). It’s currently in RC, but if I’m not mistaken a ... — committed to GaborWnuk/react-native by alloy 7 years ago
- [podspec] Fix build when source exists in path with whitespace. https://github.com/facebook/react-native/issues/11781#issuecomment-287176373 — committed to alloy/react-native by alloy 7 years ago
- Fix issue with whitespace in path to source and stabilise CI. Summary: * Fixes issue where headers could not be found due to whitespace in an unquoted header search path. https://github.com/facebook/... — committed to facebook/react-native by alloy 7 years ago
- Make podspec great again. Summary: Fixes #11272 Fixes #11572 Fixes #11781 The main changes here are: * This depends on the latest CocoaPods (1.2.0). It’s currently in RC, but if I’m not mistaken a ... — committed to fullcontact/react-native by alloy 7 years ago
This solution probably won’t work for everyone but when I commented out
use_frameworks!
in my pod file, theyoga/Yoga.h file not found
error went away.@kmuralidharan91 You don’t need all the above fixes anymore, remove your patch function in your Podfile, remove the postinstall script in your package.json, just put react-native’s v0.42.0-rc.3 tag or master branch in your dependencies and add yoga as a pod dependency and it should work
package.json:
Podfile:
Don’t forget to change all your
#include "RCT..."
to#include <React/RCT...>
tooI got the yoga error to go away by adding it to my header search paths
I’m getting similar error messages. In my case:
I had like 5-6 more but those went away after I deleted my
node_modules
folders and rannpm install
. These 2 remained, though, and my app won’t build.What are we missing?
@julienfouilhe I have the example. SwiftReactNative.zip
the steps is
and it show
I found the way to fixed my issue: my cocoapods was too old (1.1.1). I just updated my cocoapods to version 1.2.0, and there is no problems any more
@javache @mmmulani Got a PR for this up #12089
After resolving the
RCTConvert.h yoga/Yoga.h file not found
, I’m now seeingjschelpers/JavaScriptCore.h' file not found
. Anyone come across this?Using react-native version
0.42.0-rc.3
with Xcode 8.2.1.After a bit of hacking around, this is now working for me in RN 0.40:
Credit to @notjosh at https://github.com/facebook/react-native/issues/11272#issuecomment-268984452 for the original.
Note also since this touches
ReactCommon
there could be implications for Android or other platforms - untested.I can confirm updating CocoaPods to 1.2.0 fixed the
#import <jschelpers/JavaScriptCore.h>
issue on a project here, too.It’s closed but I still am not sure how to make it work. I do have a Podfile like this
pod 'React', :path => './node_modules/react-native', :subspecs => [ 'Core', 'RCTWebSocket', ]
…and did an
npm install
which upgraded my version of React to 0.41.2I still get a
cstdint file not found
Thanks@rh389 I’m using swift and not using
use_frameworks!
would be painful, wouldn’t it? Some of my dependencies are written in Swift.What would need to be done in a post_install script? Changing
<yoga/Yoga.h>
for"yoga/Yoga.h"
did not help, even when I added:${SRCROOT}/../ios-editor/node_modules/react-native/ReactCommon
to the User Header Search Paths of my project@alloy @rh389 I created a really fast application that displays the compilation error. Hopefully it is just something simple I am doing wrong 😃
https://github.com/joshuafeldman/react-native-missing-file
Be sure to add the Yoga pod to your Podfile as shown here https://github.com/facebook/react-native/pull/12089#issuecomment-277553904
Please never mind… Old node_modules (had to redo npm install).
@julienfouilhe - I replicated the Podfile as well as package.json dependency. Running
pod install
produces:Analyzing dependencies Fetching podspec for
React
from./node_modules/react-native
Fetching podspec forYoga
from./node_modules/react-native/ReactCommon/yoga
[!] No podspec found forYoga
in./node_modules/react-native/ReactCommon/yoga
Any idea?
I am using react native in an already existing iOS app. Everything is working fine with
0.39.0
.When I tried updating to 0.40.0, I get this error message when compiling (RCTConvert.h yoga/Yoga.h file not found)
@emilsjolander
@alloy there it is 🙌
Appreciate the insight.
@joshuafeldman, @alloy: same problem here.
update pod to 1.2.0
run “pod update”
clean & build
worked for me
@ambientlight:
in my Build Settings ==> Header Search Paths
i used “$(SRCROOT)/Pods/Headers/Public/” - for the environment variable
@alloy yes, I can confirm that with cocoaPods 1.2.0 it builds fine out of the box. thanks.
@alloy What release will this commit be available into? Can we expect it to be part of
0.42.0
?@GrahO23 thanks for trying… ughhh… was hoping for the magical 0.41