Javascript – React Native Config.h not found

iosjavascriptobjective creact-nativexcode

I'm beginner of React native developer.

After create new project then open it.

xcode is display error config.h file not found in mutex.h file. I'm also search in google and try possible solution but still display same error.

I'm done Following Commands

1

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2

brew install watchman

3

npm install -g react-native-cli

4

react-native init projectName

5

cd projectName
react-native start

6

react-native run-ios

Error in CMD
./Desktop/Demo React Native/projectName/node_modules/react-native/React/../third-party/glog-0.3.4/src/base/mutex.h:105:10: fatal error: 'config.h' file not found

include "config.h" // to figure out pthreads support

1 error generated.

Software Version List
Homebrew 1.6.8
react-native-cli: 2.0.1
react-native: 0.55
watchman 4.9.0
npm 6.1.0

I'm also try this soluation but still error

In the Terminal, navigate to the third-party/glog and config glog file

cd node_modules/react-native/third-party/glog-0.3.4
./../scripts/ios-configure-glog.sh

Best Answer

I got it fixed by following this steps:

  1. Close Xcode.
  2. cd <Project-Folder>/node_modules/react-native/third-party/glog-0.3.4
  3. Run ./configure
  4. Run make
  5. Run make install
  6. Open Xcode and try building the Project.

Hope this solves the issue