问题描述
我正在Mac OS Mojave和Xcode 10上测试React Native 0.56.0-rc.2.
I'm testing React Native 0.56.0-rc.2 on Mac OS Mojave and Xcode 10.
运行:
react-native init TestProject --version="0.56.0-rc.2"
cd TestProject
npm run start
react-native run-ios
这会产生一些长时间的错误.
Which generated some long errors.
输入Xcode后,我发现glog缺少config.h
失败,我发现这可以手动构建:
Entering Xcode gave me a failure on missing config.h
for glog, which I found could be built manually:
cd ./node_modules/react-native/third-party/glog-0.3.4
./configure && make && make install
哪个阶段过去了,但又让我陷入了另一个问题
Which passed that stage, but got me on yet another issue
(...)/node_modules/react-native/third-party/glog-0.3.4/src/glog/logging.h:85:10:
'gflags/gflags.h' file not found
我在Google或Stack Overflow上找不到与RN相关的任何内容,仅引用了其他软件包以及在基于Debian的系统上安装这些软件包的说明.
I can't find anything related to RN and this on Google or Stack Overflow, only references to other packages and instructions to install those on a Debian-based system.
这是一个已知问题吗?
推荐答案
从项目目录运行此文件已为我修复:
Running this from the project directory fixed it for me:
cd ./node_modules/react-native/third-party/glog-0.3.4 && ../../scripts/ios-configure-glog.sh
这将手动触发配置脚本
这篇关于Mojave + Xcode 10构建在glog config.h,gflags/gflags.h上失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!