react-native Error installing Flipper-Glog

  • 问题:新建"react-native": "0.67.3"项目,pod install时卡在Flipper-Glog一直失败
    react-native Error installing Flipper-Glog_第1张图片
  • 解决方案:
    1、找到./node_modules/react-native/scripts/react_native_pods.rb文件,将Flipper-Glog to 0.3.6改成0.3.9
    react-native Error installing Flipper-Glog_第2张图片
    2、找到./node_modules/react-native/scripts/ios-configure-glog.sh文件,在CURRENT_ARCH="${CURRENT_ARCH}"的下面增加下面两行代码
wget -O config.guess 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD'
wget -O config.sub 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD'

react-native Error installing Flipper-Glog_第3张图片

  • 如问题还未解决:尝试下面两种方法
git config --global core.autocrlf false

sudo xcode-select --switch /Applications/Xcode.app
cd ios && pod install

参考资源:
https://github.com/facebook/react-native/issues/32033#issuecomment-902560416

https://github.com/facebook/react-native/pull/30753/commits/9d66b702be27a2866bf9def08d57c8c5e18587dc

https://github.com/facebook/react-native/issues/25561

你可能感兴趣的:(ios,react-native开发,macos,react,native,ios)