Skip to content

fix(iOS): fails to find yoga config on rn 0.73 #70

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

Closed
wants to merge 1 commit into from

Conversation

dylancom
Copy link

@dylancom dylancom commented Jan 22, 2024

Fixes #69

@staltz
Copy link
Member

staltz commented Jan 22, 2024

Thank you for submitting this fix. I was actually working on this earlier today and I was trying in a different way.

In my understanding, the <node.h> import is a system-level import, which may look for the header file from node_modules or from your installed Node.js instance, which is not the intended effect. We need to import nodejs-mobile's specific node.h which is largely the same as the host Node.js headers, but not exactly.

The root problem is that CocoaPods for nodejs-mobile-react-native in the context of React Native is setting HEADER_SEARCH_PATHS to have all React Native pods, while we would like to specify that nodejs-mobile-react-native's HEADER_SEARCH_PATHS is only from nodejs-mobile-react-native. I haven't yet succeeded in configuring this, because whatever I do, it always concatenates all RN pods into this HEADER_SEARCH_PATHS.

So as it is, I don't think we should merge your PR because it may cause new problems if the header files between Node.js (whatever random version is locally installed) and nodejs-mobile diverge.

@dylancom
Copy link
Author

Understood, will use this patch until a better solution is found.

@staltz
Copy link
Member

staltz commented Jan 23, 2024

Fixed now in nodejs-mobile-react-native version 18.17.6

@staltz staltz closed this Jan 23, 2024
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

Successfully merging this pull request may close these issues.

XCode/CocoaPods fails to find yoga/config/Config.h on RN 0.73.2
2 participants