Friday, February 2, 2018

React Native - Fatal Error: 'config.h' file not found

Errors are like better half to all programmers 😍  😜. I think every programmers in this world will agree with me. Our days start with an error and end with another one. So today's post is about one of the most common error of React Native.
Specially who are new to this framework or has upgraded old version to new one, most of them have faced this "Fatal Error: 'config.h' file not found" error. (Image 1 & Image 2) 😭

Just delete the third-party folder inside of the react-native folder (Image 3), then build it. If you are lucky it should work. But if your luck does not favor 😢  then you have to install the glog manually.

cd to the glog folder of your project in your terminal. ( in my case the is like *****/MyProject/node_modules/react-native/third-party/glog-0.3.4) (Image 3)
Then type "./configure && make install" (Image 4).  After some moments if you build your app in XCode or start by using react-native command (react-native run-ios), it will successfully run like Image 5.


Image 1 : 'config.h' file not found in terminal

Image 2 : 'config.h' file not found in XCode


Image 3 : Deleting the third-party folder from react-native folder
Image 4 : Installing glog manually
Image 5 : App recovered from the error 😁


If you like this post please like share comment. Enjoy your coding 😉

No comments:

Post a Comment