'config.h' file not found

升级 react-native 后,run 提示 ‘config.h’’ file not found,之后在 issues 下找到如下解决方法:

Running into the same issue here after upgrading from 0.44. None of the above solutions or clearing caches did the trick for me. Here’s what I did to get things working again:

  • 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

react-native/issues/14382