找不到 xcode 'boost/config/user.hpp' 文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/45262978/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
xcode 'boost/config/user.hpp' file not found
提问by mengdi
I'm using Xcode 9, everything was fine. but after I upgrade my React-native version to 0.46, and upgrade my React to 16.0.0 alpha12. and re-run my project, Xcode gives me an error 'boost/config/user.hpp' file not found
, I use brew install boost
to install boost. but it doest work.
It seems like something wrong with react-native, because I can use Xcode to create a new iOS project and works fine, but when I use 'react-native init newProject', It gives me the same error.
我正在使用 Xcode 9,一切都很好。但是在我将 React 原生版本升级到 0.46,并将我的 React 升级到 16.0.0 alpha12 之后。并重新运行我的项目,Xcode 给了我一个错误'boost/config/user.hpp' file not found
,我brew install boost
用来安装 boost。但它不起作用。react-native 似乎有问题,因为我可以使用 Xcode 创建一个新的 iOS 项目并且工作正常,但是当我使用“react-native init newProject”时,它给了我同样的错误。
回答by Shamin Meerankutty
Just remove the cache and the third_party folder in react-native in node modules
只需删除节点模块中 react-native 中的缓存和第三方文件夹
rm -r ~/.rncache
rm -r <your-project>/node_modules/react-native/third_party
回答by Amir Alagic
I just run the command : npm install
and fixed the issue..
我只是运行命令:npm install
并解决了问题..
回答by Fakhruddin Abdi
For those who are using react-native version > 0.57
对于那些使用 react-native 版本 > 0.57 的人
rm -r ~/Library/Caches/com.facebook.ReactNativeBuild
rm -r <your-project>/node_modules/react-native/third_party
回答by David Schumann
for me it was key to remove the ios/Podfile.lock file after removing the ios/Pods/ folder
对我来说,删除 ios/Pods/ 文件夹后删除 ios/Podfile.lock 文件是关键
回答by Niroshan Ranapathi
Hope this also helpful
希望这也有帮助
Deleting the Podfile
for boost, and running pod install
again
删除Podfile
for boost,然后pod install
再次运行