How to solve "config.h file not found"? when running app from the react native on the device?

Viewed 7415
5 Answers

try it

Open Terminal, go to your project’s root folder and do:
cd node_modules/react-native/third-party/glog-0.3.4/

enter image description here Run the configure script: ./configure enter image description here Open Xcode and try to run your app.

Xcode 10

"react-native": "0.57.5"

cd ./node_modules/react-native && scripts/ios-install-third-party.sh && cd third-party && cd $(ls | grep 'glog' | awk '{print $1}') && ./configure

For me:

# rm -rf  node_modules

# npm cache verify  (Because I'm using npm version 5.0.3)

# npm install

Xcode Clean

Xcode Run

If that doesn't work,

In the Terminal, navigate to the react-native/third-party/glog folder inside node_modules

(for me, this was cd node_modules/react-native/third-party/glog-0.3.4)

Once actively in this folder,

#run ../../scripts/ios-configure-glog.sh

Glog is configured and the required config.h header file is created for Xcode to find

Remove the third-party folder in your node_modules/react-native folder.

Related