Getting error "Config.h file not found, lexical or preprocessor error."
I am running app in the device from the xcode project.
I have google and found many solutions but haven't worked, I tried this
https://github.com/facebook/react-native/issues/14382
And when I try to run in the iOS simulator getting this error
https://github.com/facebook/react-native/issues/10401
Tried to follow the above url but didn't work.
Please let me know how to solve the issue. Thanks
I faced the same issue and it's fixed by these commands:-
yarn
npm
Just go on the config.h file, click on the right panel and add the file to the app target by checking the right case. Clean and compile again.
Remove the third-party folder in your node_modules/react-native folder.
For me:
If that doesn't work,
In the Terminal, navigate to the
react-native/third-party/glog folder
insidenode_modules
(for me, this was
cd node_modules/react-native/third-party/glog-0.3.4
)Once actively in this folder,
Glog is configured and the required
config.h
header file is created forXcode
to findtry it
Run the configure script: ./configure Open Xcode and try to run your app.
Xcode 10