0

I can't build in Xcode since I upgraded macOS to Catalina.

I get the following error messages:

/node_modules/react-native/React/Views/UIView+React.h:10:9: 'React/RCTComponent.h' file not found

/node_modules/react-native/React/Base/RCTEventDispatcher.h:10:9: 'React/RCTBridge.h' file not found

I tried the following sequence:

  1. rm -rf node_modules
  2. npm run reinstall
  3. npm run iosPods (does rm -rf Pods then pod install)
  4. npm run start --reset-cache
  5. Delete Derived Data and do a Xcode Clean build then build

To no avail...

This is the output from react-native info:

System:
    OS: macOS 10.15.6
    CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
    Memory: 910.33 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 8.9.4 - ~/.nvm/versions/node/v8.9.4/bin/node
    Yarn: 1.22.4 - ~/.yarn/bin/yarn
    npm: 6.14.8 - ~/.nvm/versions/node/v8.9.4/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 29
      Build Tools: 29.0.3
  IDEs:
    Xcode: 11.3.1/11C505 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: 0.61.5 => 0.61.5 
  npmGlobalPackages:
    react-native-cli: 2.0.1
HimmelKino
  • 31
  • 4
  • I got this issue in the past and I delete xCode and all related to it and reinstall again. Its a pain https://stackoverflow.com/questions/31011062/how-to-completely-uninstall-xcode-and-clear-all-settings. – anthony willis muñoz Sep 03 '20 at 16:05
  • OK. Let me try this. Thanks. – HimmelKino Sep 03 '20 at 16:07
  • It didin't work for me. Still getting /node_modules/react-native/React/Views/UIView+React.h:10:9: 'React/RCTComponent.h' file not found – HimmelKino Sep 04 '20 at 11:02
  • check your podfile to be accord to this https://github.com/react-native-community/rn-diff-purge/blob/release/0.61.5/RnDiffApp/ios/Podfile. Delete your podfile lock. pod deintegrate and pod install. Also be sure you open workspace instead of project – anthony willis muñoz Sep 04 '20 at 11:33

1 Answers1

0

The issue was that the Cocoapods version was greater than 1.8. Later versions like 1.9.1 don't install pods correctly in our project at the moment.

HimmelKino
  • 31
  • 4