`React/RCTBridgeModule.h` file not found

后端 未结 21 2114
执笔经年
执笔经年 2020-11-30 00:31

Getting this error while building a react-native iOS app on xcode.

Started getting this error after npm install and rpm linking react-native-fs library. But

相关标签:
21条回答
  • 2020-11-30 00:39

    anhdevit's suggestion in https://github.com/facebook/react-native/issues/24363#issuecomment-488547280 worked for me:

    In your terminal, run: defaults delete com.apple.dt.Xcode

    0 讨论(0)
  • 2020-11-30 00:42

    You just need to install pod, if pod file exists just type

    pod install
    

    if not: so first,

    pod init
    

    then,

    pod install
    

    in terminal. and you are good to go.

    0 讨论(0)
  • 2020-11-30 00:42

    I ran into this issue after doing a manual react-native link of a dependency which didn't support auto link on RN 0.59+

    The solution was to select the xcodeproj file under the Libraries folder in Xcode and then in Build Settings, change Header Search Paths to add these two (recursive):

    $(SRCROOT)/../../../ios/Pods/Headers/Public/React-Core
    $(SRCROOT)/../../../ios/Pods/Headers/Public
    
    0 讨论(0)
  • 2020-11-30 00:43

    For viewers who got this error after upgrading React Native to 0.40+, you may need to run react-native upgrade on the command line.

    0 讨论(0)
  • 2020-11-30 00:46

    After React Native 0.60 this issue is often caused by a linked library mixed with the new 'auto-linking' feature. This fixes it for me

    Unlink old library using

    $ react-native unlink react-native-fs
    

    Refresh Pods integration entirely using

    $ pod deintegrate && pod install
    

    Now reload your workspace and do a clean build.

    0 讨论(0)
  • 2020-11-30 00:47

    Latest releases of react-native libraries as explained in previous posts and here have breaking compatibility changes. If you do not plan to upgrade to react-native 0.40+ yet you can force install previous version of the library, for example with react-native-fs:

    npm install --save -E react-native-fs@1.5.1
    
    0 讨论(0)
提交回复
热议问题