环境:macOS 10.13.6,Xcode:Version 10.0 (10A255)
react-native --version0.55.0
'config.h' file not found
/Users/hongye/Desktop/Ecogearing/node_modules/react-native/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.
解决办法:
cd node_modules/react-native/third-party/glog-0.3.4
../../scripts/ios-configure-glog.sh
clean the project and build again, the error is gone
其实执行 .sh 命令之后Terminal界面的一些处理流程,我们不难看出,这个命令是check .h头文件的引用情况,然后建立关联关系