美文网首页
fatal error: 'config.h'

fatal error: 'config.h'

作者: Tony_Yang | 来源:发表于2018-06-13 12:12 被阅读41次

    解决步骤

    • 首先删除node_modules文件夹,然后重新安装
    rm -rf node_modules/ && yarn cache clean && yarn install
    
    • 运行后如果发现依然报这个错误,查看third-party文件夹是否存在
    ls node_modules/react-native/
    
    • 如果发现third-party文件夹不存在,执行
    node_modules/react-native/scripts/ios-install-third-party.sh
    
    • 等待命令执行完成后再次查看third-party文件夹就会出现了
    ls node_modules/react-native/
    

    再次运行项目,如果发现依然报此错误,那么在Xcode项目文件目录下的Libraries/React.xcodeproj/ThirdParty/glog/config.h文件应该是红色的

    • 然后继续执行
    cd node_modules/react-native/third-party/glog-0.3.4
    
    ../../scripts/ios-configure-glog.sh
    

    执行完成后config.h文件就有了

    那么再次运行肯定就OK了,即便有问题肯定也不是这个报错了~

    参考链接:


    而我这次,不幸就是如此,报了另外一个新错误:
    cannot be found: '/xxx/node_modules/reactnative/Libraries/WebSocket/libfishhook.a'

    解决办法:


    image.png

    相关文章

      网友评论

          本文标题:fatal error: 'config.h'

          本文链接:https://www.haomeiwen.com/subject/woadeftx.html