Closed
Description
After upgrading from 0.44.3
-> 0.45.0
, XCode no longer builds for me with the following error:
Lexical or Preprocessor Issue
'config.h' file not found
I am not using cocoa pods, just npm packages. Seems like some related changes have been made that may be causing this issue?
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
Tom-Bonnike commentedon Jun 8, 2017
I’ve got the same issue. :(
javache commentedon Jun 8, 2017
Can you try removing the third-party folder in your node_modules/react-native folder?
javache commentedon Jun 8, 2017
Looks like there's a bug with the install-third-party scripts. In
ios-install-third-party.sh
can you replace "$SCRIPTDIR/ios-configure-glog.sh" with "../../scripts/ios-configure-glog.sh"?Tom-Bonnike commentedon Jun 8, 2017
Removing the third party folder did the trick. (I left the third-party-podspecs folder, though). Do you still want me to try the other fix?
javache commentedon Jun 8, 2017
Yeah, if you could try removing the folder again, and try if running that script still works, that'd be awesome!
javache commentedon Jun 8, 2017
Sorry, I meant the react-native folder.
Tom-Bonnike commentedon Jun 9, 2017
@javache☹️
It did work (WITHOUT modifying the script like you asked), so yeah, can’t really reproduce the issue
Here’s the output just in case it could be of any help:
kumarryogeshh commentedon Jun 9, 2017
Fixed using earlier versions. Try this
react-native init --version="0.42.0" AwesomeProject
dioxide commentedon Jun 10, 2017
same issues , look:

xzf158 commentedon Jun 15, 2017
I’ve got the same issue. :(
mattijsf commentedon Jun 15, 2017
I also have the same issue after updating from 0.44.0 > 0.45.1:
$ rm -rf node_modules/ && yarn cache clean && yarn install
$ ls node_modules/react-native/
(missingthird-party
directory)Xcode build fails:
'config.h' file not found
$ node_modules/react-native/ios-install-third-party.sh
ornode_modules/react-native/scripts/ios-install-third-party.sh
$ ls node_modules/react-native/
(third-party directory found)Xcode build succeeds.
Edit:
After running
ios-install-third-party.sh
once I can repeat$ rm -rf node_modules/ && yarn cache clean && yarn install
after which thethird-party
is still missing, however a following Xcode build now correctly creates thethird-party
by itself and the builds succeeds.mattijsf commentedon Jun 15, 2017
Building my parent / main project still fails:
I multiple of these errors:
I also noticed that the files linked from the React project are wrong/missing. For example:
node_modules/react-native/React/folly-2016.09.26.00/folly/dynamic.cpp
node_modules/react-native/React/glog-0.3.4/src/config.h
Which doesn't exist.
If I build a new project using
react-native init
the same files in the React project have these link:node_modules/react-native/third-party/folly-2016.09.26.00/folly/dynamic.cpp
node_modules/react-native/third-party/glog-0.3.4/src/config.h
Which do exist.
(btw I'm not using CocoaPods)
redak105 commentedon Jun 15, 2017
I have same problem at version 0.45.0 and 0.45.1.
In Xcode have added Third party (folly, glog, double-conversion) in React project, which are not exist at path set in project.
I am using npm version 5.0.3.
mattijsf commentedon Jun 15, 2017
My above comment about files that are not linked correctly solved by itself so I don't think the errors were related to that at all:
$ rm -rf node_modules/ && yarn cache clean && yarn install
$ open node_modules/react-native/React/React.xcodeproj/
node_modules/react-native/React/glog-0.3.4/src/demangle.h
: wrong & missingnode_modules/react-native/React/glog-0.3.4/src/demangle.h
: still wrong & missing$ open node_modules/react-native/React/React.xcodeproj/
node_modules/react-native/third-party/glog-0.3.4/src/config.h
: corrected with/third-party
& exists.Basically the paths were changed / fixed after a successful build of the
React
project. Xcode just didn't refresh the paths correctly.I still get the same
folly::detail::formatBinary
related errors as @dioxidemattijsf commentedon Jun 15, 2017
Finally fixed the
folly::detail::formatBinary
related errors. They were caused by the-all_load
flag in my Other Linker Flags.151 remaining items