React Native Config.h not found

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

enter code hereenter code hereenter code here/usr/bin/ruby -e "$(curl -fsSLhttps://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

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

Run following commands in project directory.Helped me resolve my config.h not found issue

1.cd node_modules/react-native/third-party/glog-0.3.4/ 2. ./configure 3. make 4. make install 5. cd ../../../.. 6. react-native run-ios

My problem was comming from using react-native@0.53.0, which I suppose has trouble with new Xcode version.

1 - Change react-native version in package.json

"react-native": "0.53.0",

to

"react-native": "0.56.0",

2 - Remove node_modules folder

$ rm -rf node_modules/

3 - Reinstall modules:

$ yarn install

Solution:

yarn upgrade log

Upgrade to v1.6.0 successful. iOS build successful.

Note: Rebuilding glog did did not work for me. Build failed.

Comments

Popular posts from this blog

Meaning of `{}` for return expression

Get current scroll position of ScrollView in React Native

flutter websocket connection issue