-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
RCTConvert.h yoga/Yoga.h file not found #11781
Comments
Is this the reason? https://github.com/facebook/react-native/releases/tag/v0.40.0 |
I'm getting similar error messages. In my case:
I had like 5-6 more but those went away after I deleted my What are we missing? |
I am using react native in an already existing iOS app. Everything is working fine with When I tried updating to 0.40.0, I get this error message when compiling (RCTConvert.h yoga/Yoga.h file not found) |
Seems like the xcode project needs to be fixed in some way. Not really sure what could have broken this. @mmmulani Could you have a look? |
This looks like it has something to do with Cocoapods integration, @julienfouilhe @emilsjolander can you confirm if this is coming from cocoapods or not? |
@JesseARWhite I am using CocoaPods yes, but I don't know if it is responsible for the error or not. XCode is giving the error when trying to build the app. |
I think this is the same issue we had in #9544, and occurs whenever Because FB needed to use angle brackets for its internal builds of CSS Layout @alloy proposed a compromise which was removed in 7c91f89 . Since the move to using angle brackets everywhere, the use of RN as a framework now looks pretty much beyond repair. AFAIK it's still possible even in a swift project to disable |
@rh389 I'm using swift and not using What would need to be done in a post_install script? Changing |
cc @javache can you reapply for fix for the include header to yoga now? |
hey everyone, I tried to repro this issue by creating a tiny project and following the Obj-C guide here: https://facebook.github.io/react-native/docs/integration-with-existing-apps.html does anyone have a smaller repro case they could post? |
I'll see if I can post a repro case tomorrow, I did reproduce the issue earlier - in the meantime have you tried enabling Edit: (Back at the mac) - repro case now up
That was created simply by creating a new single-page ObjC app with the XCode wizard, then Attempting to build that in XCode should allow you to reproduce the I don't know of a way to overcome this while the |
Hi @mmmulani I also created a simple swift project, with all the files already in the repo, so all you have to do is launch the xcworkspace in xcode and try to build: https://github.com/julienfouilhe/test-yoga-file-not-found Thanks! |
@javache and I found a workaround to this problem and we'd like someone from the community to champion it and support it going forward. we created a
and then include it from the main Podfile with you would have to make another one for jschelpers and possibly any other subspec we have that uses a different header search path. but this seems like a bug in CocoaPods, it should let use create the React dependency and link all its subspecs statically but create the whole React dependency as a dylib. cc @alloy for any ideas here |
@mmmulani
Podfile
But I had to change
|
Having the same issue, any progress on this? |
This solution probably won't work for everyone but when I commented out |
I'm making a private pod. The podspec file of version 0.40.0 fails CocoaPods lint command. It shows the It's a sad story that I came accross a similar error in version 0.36.0 when I tried to integrate React Native into my existing app with CocoaPods. Now, the issue appears again. NOTE: Commenting out Did you seriously lint your podspec before a new release? |
Is there a solution where I don't have to comment out |
@Gagege I'm not sure I can call it a solution, but I'd say it's palliative at the very least: I've downgraded to |
does this post install script repair the yoga problem? (by changing CSSLayout to Yoga) |
After a bit of hacking around, this is now working for me in RN 0.40: # Uncomment this line to define a global platform for your project
platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'FrameworkDemo' do
pod 'React', :subspecs => ['Core'], :path => './node_modules/react-native'
end
pre_install do |installer|
# Yoga exists in two places in the RN source tree. Delete the obsolete one to avoid redefinitions
`rm -rf node_modules/react-native/React/CSSLayout`
end
post_install do |installer|
patch_subspecs(installer)
end
def patch_subspecs(installer)
# patch source and header files
`find node_modules/react-native/React node_modules/react-native/ReactCommon \\( -name *.h -o -name *.m -o -name *.mm \\) -print0 | xargs -0 sed -i '' -E 's:<(yoga|jschelpers|cxxreact)/(.*)>:"\\2":g'`
# exclude duplicate symbols
# https://github.com/facebook/react-native/issues/11502
installer.pods_project.targets.each do |target|
next unless target.name == 'React'
source_files = target.source_build_phase.files
uniqs = source_files.uniq { |f| f.file_ref.path }
(source_files - uniqs).each { |dup| source_files.delete(dup) }
end
end Credit to @notjosh at #11272 (comment) for the original. Note also since this touches |
@javache @mmmulani Just getting back on RN work from a hiatus. I fixed a podspec in the yoga repo yesterday, thinking it was somehow related to this, but am now thinking that it is not: facebook/yoga#352 In this other comment @javache mentions “we've split the react-native podspec into multiple podspecs”, is that available somewhere? Basically, what is the latest that I should be looking at and work from? |
I'm not using cocoapods and have the same issue. @adamgins, did you find a fix? Related stack overflow question: http://stackoverflow.com/questions/31860715/rct-linking-manager-file-not-found |
@JulianKingman no, I downgraded to 0.39.2 and have been on vacation for the last week... so need to get back to this now. |
@alloy thanks heaps... I have not tried this yet. Also wondering if anyone had seen any improvements with |
@rh389 we have been using this setup for over a year without issue. The issue only came up when upgrading to 0.42.0. All the correct files exist at the correct spot. Essentially we checkin the contents of |
@joshuafeldman Can you share a reduced example app that demonstrates the problem? |
@alloy I will try and find some time this morning and wrap something up |
@joshuafeldman, @alloy: Went into the Pods.xcodeproj within Xcode. Then opened React target Build Settings. Looked into Header Search Paths, $(PODS_TARGET_SRCROOT) environment variable doesn't get resolved. (cocoapods issue?) Steps to reproduce (cocoapods version 1.1.1):
{
"name": "test",
"version": "1.0.0",
"private": true,
"description": "Test",
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start"
},
"dependencies": {
"react": "~15.4.2",
"react-native": "~0.42.0"
}
}
|
@ambientlight You need CocoaPods version >= 1.2.0. Can you double-check if that fixes it for you? |
@joshuafeldman Awesome, thanks! Will take a look later today. |
@alloy yes, I can confirm that with cocoaPods 1.2.0 it builds fine out of the box. thanks. |
@joshuafeldman, @alloy:
worked for me in my i used |
@alloy the project I linked to was setup using cocoapods version 1.2.0 and exhibits the issue. I wonder what the difference is. |
@joshuafeldman I gave it a spin, the issue is the space in the I’ll make a PR for this, but in the meantime you can work around it by either:
|
@alloy there it is 🙌 Appreciate the insight. |
Summary: * Fixes issue where headers could not be found due to whitespace in an unquoted header search path. #11781 (comment) * Stabilises CI but not needing to download the source for Yoga, but use the existing cloned repo instead. /cc mkonicek Closes #13007 Differential Revision: D4735347 fbshipit-source-id: 933aefcb0e65537d2e759d25f4e3b81cdf4b8cb5
Summary: Fixes facebook#11272 Fixes facebook#11572 Fixes facebook#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 proper release is expected soon. /cc dantoml * Adds required header search paths for the jschelpers and cxxreact subspecs. * Makes the jschelpers and cxxreact headers private to building React Native, not visible to the user’s project. * It uses the canonical upstream Yoga v1.0.0 podspec: https://github.com/facebook/yoga/blob/master/Yoga.podspec * Consistent styling. I have been able to get our app to build again using this artsy/emission#437. The spec has some warnings, but otherwise fully passes lint. rh389 sjmueller Could you please test with your projects? Closes facebook#12089 Differential Revision: D4518605 fbshipit-source-id: ecf86232d8b1af52d139eadd1acc10f5c1d42c29
This error occurs again on a fresh install of |
@gotoAndBliss try deleting your ios build folder |
I am running into the following error and have setup a simple example for anyone to advise what's going wrong here: https://github.com/cliren/RNIntegration. Using cocopods version: 1.1.1 (can't upgrade due to exiting app's dependency). Appreciate any help!
|
I had a similar issue with yoga/Yoga.c, and fixed it by running |
@tmaly1980 I tried your suggestion on https://github.com/cliren/RNIntegration but still ran into the same issue. I am using the below dependencies, may I know what versions are you using?
|
I have to stick with 0.42.3 and 15.4.1 because of some packages that refuse to support alpha code (react 16.0.0)
… On Jun 13, 2017, at 10:07 AM, Suren ***@***.***> wrote:
@tmaly1980 <https://github.com/tmaly1980> I tried your suggestion on https://github.com/cliren/RNIntegration <https://github.com/cliren/RNIntegration> but still ran into the same issue. I am using the below dependencies, may I know what versions are you using?
"react": "16.0.0-alpha.12",
"react-native": "0.45.1"
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#11781 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AHVz252kcXlOOpxarKsVyaHfRHs0OKTRks5sDpe1gaJpZM4Ld7Nd>.
|
@tmaly1980 I tried 0.42.3 and 15.4.1 but still get the same error. It looks very fragile unless I am missing something basic. Would you mind checking if I am missing anything here: https://github.com/cliren/RNIntegration?
|
Sorry, I honestly don’t know, I am using ignite as a boilerplate/scaffolding and they have a command line script out that generates my project. Not to sound like a sales person, it saves me a ton of time with having a project structure in place and generating components, containers, redux/sagas, etc. I tried upgrading to 16.0.0.alpha-2 but that breaks some of the testing suite I’m relying upon (as the core API has changed but THOSE test library developers refuse to support alpha software).
… On Jun 14, 2017, at 12:58 AM, Suren ***@***.***> wrote:
@tmaly1980 <https://github.com/tmaly1980> I tried 0.42.3 and 15.4.1 but still get the same error. It looks very fragile unless I am missing something basic. Would you mind checking if I am missing anything here: https://github.com/cliren/RNIntegration <https://github.com/cliren/RNIntegration>?
react-native-cli: 2.0.1
react-native: 0.42.3
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#11781 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AHVz2yfk80WrYF70zE6SoDVyfRIgscptks5sD2h0gaJpZM4Ld7Nd>.
|
After upgrading from RN 0.42.3 to 0.43.3, I got similar issue with RCTDevMenu, though I'm sure these file exist.
(Thanks to that I know that CocoaPods need to re-config RN dependency by running |
For the ones having this issue with RN 0.47 or above, Revert the disk fixed (at least locally) the issue. |
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
The text was updated successfully, but these errors were encountered: