react-native: 'config.h' file not found
- Review the documentation: https://facebook.github.io/react-native
- Search for existing issues: https://github.com/facebook/react-native/issues
- Use the latest React Native version: https://github.com/facebook/react-native/releases
- Run
react-native infoin your terminal and paste its contents under “Environment” - Let us know how to reproduce the issue. Include a code sample, share a project, or share an app that reproduces the issue using https://snack.expo.io/
Environment
Environment: OS: macOS High Sierra 10.13.3 Node: 8.6.0 Yarn: 1.2.1 npm: 5.6.0 Watchman: 4.9.0 Xcode: Xcode 9.2 Build version 9C40b Android Studio: 3.1 AI-173.4720617
Packages: (wanted => installed) react: 16.3.1 => 16.3.1 react-native: 0.55.4 => 0.55.4
Description
when i adding a single view to existing native applications, it works ok. But an error occurred when I tried to package my app.
Steps to Reproduce
Successfully integrated into existing applications package error
Expected Behavior
package success
Actual Behavior
…/ios/Pods/glog/src/base/mutex.h:105:10: fatal error:
'config.h' file not found
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 35 (2 by maintainers)
Please use Stack Overflow for this type of question.
I need a little bit more, but then it works for me too 😃
(replace glog-0.3.X with yours)
Remove library libfishhook.a and add again

I wrote something a bit cleaner for my purposes and installed the fix within the node_modules/react-native package. Normally I would prefer not to modify a node_module directly, but under this circumsance I felt that it was worth it and allowed us to add a simple script in our yarn start script and we get a clean run from a fresh clone in multiple products.
“react-native-vector-icons”: “4.5.0” this script can be useful for a bug relating to this package.
rm ./node_modules/react-native/local-cli/core/__fixtures__/files/package.jsonglog-0.3.4
cd node_modules/react-native && scripts/ios-install-third-party.sh && cd third-party && cd glog-0.3.4 && ./configure && cd ../../../../glog-0.3.5
cd node_modules/react-native && scripts/ios-install-third-party.sh && cd third-party && cd glog-0.3.5 && ./configure && cd ../../../../manual
npm installoryarn- install packagescd node_modules/react-native- go to node modules directoryscripts/ios-install-third-party.sh- install @ node_modules/react-native/third-partycd third-party- go to newly created third party directorycd glog-0.3.x-ls -lato find your directory version number or just use tab to auto-complete./configure- run setupcd ../../../../- change back to your project directoryreact-native run-iosorreact-native run-android- deployFix my bug.
rm -rf node_modules/ && yarn cache clean && yarn install node_modules/react-native/scripts/ios-install-third-party.sh
For any glog
@ReggaePanda I did indeed have to run that
/configurescript but I had to run it within the glog directory, akacd node_modules/react-native/third-party/glog-0.3.4/; ./configureThis worked for me:
I’m always amazed - how do you guys figure out cryptic errors like those? Especially when it is what feels like an endless chain of fix/new error story…
Thanks for the fix @ReggaePanda .
thank you @ReggaePanda, it works, you helped me a lot!
I followed the pastures of @MinhajJaved … however after executing the command “./ios-install-third-party.sh”, I moved the “third-party” directory to a level below that is in the folder "node_modules / react-native “and I ran the next command” cd …/third-party/glog-0.3.xe ./configure "… it worked perfectly …
Why did I do this? because the command “ios-install-third-party.sh” installs the “third-party” package in the “node_modules / react-native / scripts” folder and not at a level below that would be "node_modules / react-native ".
This for react-native 0.57.7
tks @MinhajJaved
This instructions works as long as theres no space in project’s path…
Same here. @ReggaePanda, thanks very much for sharing!
@ReggaePanda YOU’RE THE MAN. After spending a 10 hours trying to figure this out, your process finally worked. Can’t thank you enough!
I had an error pointing to a missing
./configfile. Because theios-install-third-party.shuses relative paths.Here’s my solution:
cd ./node_modules/react-native/scripts/third-party/glog-0.3.4 && ../../scripts/ios-install-third-party.sh && cd ../../../../Note the
glog-0.3.4version may change depending on yourreact-nativeversion.@ReggaePanda
Can’t thank you enough!
This answer works just fine. Thanks
i just remove spacing from project parent folder name
Working On to Working-On
Close Xcode --> Clean --> Run
You need to change to the legacy build system in Xcode 10 and install third party scripts manually.
1:
File -> Project/Workspace settings Build System: dropdown -> change to Legacy Build system
2: Follow this to manually install third party scripts for RN:
Clean RN cache
$ rm -rf ~/.rncache
Re-install the deps
$ cd your_project_path $ rm -rf node_modules/ && npm install
Then install the third-party
$ cd node_modules/react-native/scripts $ ./ios-install-third-party.sh
Run the commands below if glog installation failed.
$ cd …/third-party/glog-0.3.x $ ./configure
It works for me, I hope it helps for you.
Why are none of these steps listed on the guide here? https://facebook.github.io/react-native/docs/running-on-device