react-native: Can't find ”RCTAssert.h” while compiling after freshly generated project on v0.10.0
It seems there’s an error in v0.10.0 that causes application generated with react-native init
to not be compilable immediately. The fix is to open <AppName>.xcodeproj/project.pbxproj
and find and replace any mention of "$(SRCROOT)/node_modules/react-native/React/**"
with "$(SRCROOT)/../node_modules/react-native/React/**"
(note the ..
)
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 22 (8 by maintainers)
The problem for me was that the Test Target had an incorrect Header Search Path. This can be fixed by going into xcode, selected the Test Target, going to build Settings, going into the section “Search Paths”.
Inside this “Search Paths” section, there is a “Header Search Paths” attribute, select it and make sure there is a search path: $(SRCROOT)/…/node_modules/react-native/React set to Recursive. MAKE SURE THE “…” is present after $(SRCROOT) or it will be looking in the wrong directory. MAKE SURE YOU’RE LOOKING IN THE TEST TARGET, NAMED {YOURAPP}Tests