找不到React Native Config.h [英] React Native Config.h not found
问题描述
我是React本机开发人员的初学者.
I'm beginner of React native developer.
创建新项目后,将其打开.
After create new project then open it.
xcode是显示错误 config.h 文件.我也在google中搜索并尝试可能的解决方案,但仍然显示相同的错误.
xcode is display error config.h file not found in mutex.h file. I'm also search in google and try possible solution but still display same error.
我已经完成了命令
1
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2
brew install watchman
3
npm install -g react-native-cli
4
react-native init projectName
5
cd projectName
react-native start
6
react-native run-ios
CMD错误
./Desktop/Demo React Native/projectName/node_modules/react-native/React/../third-party/glog-0.3.4/src/base/mutex.h:105:10:致命错误:'config.h找不到文件
Error in CMD
./Desktop/Demo React Native/projectName/node_modules/react-native/React/../third-party/glog-0.3.4/src/base/mutex.h:105:10: fatal error: 'config.h' file not found
产生了1个错误.
软件版本列表
自制软件1.6.8
react-native-cli:2.0.1
react-native:0.55
守望者4.9.0
npm 6.1.0
Software Version List
Homebrew 1.6.8
react-native-cli: 2.0.1
react-native: 0.55
watchman 4.9.0
npm 6.1.0
我也在尝试这种解决方法,但仍然出错
在终端中,导航到第三方/glog 和配置glog 文件
In the Terminal, navigate to the third-party/glog and config glog file
cd node_modules/react-native/third-party/glog-0.3.4
./../scripts/ios-configure-glog.sh
推荐答案
我已按照以下步骤进行了修复:
- 关闭 Xcode .
-
cd <Project-Folder>/node_modules/react-native/third-party/glog-0.3.4
- 运行
./configure
- 运行
make
- 运行
make install
- 打开 Xcode ,然后尝试构建项目.
- Close Xcode.
cd <Project-Folder>/node_modules/react-native/third-party/glog-0.3.4
- Run
./configure
- Run
make
- Run
make install
- Open Xcode and try building the Project.
希望这可以解决问题
这篇关于找不到React Native Config.h的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!