question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot compile on iOS: RCTBridgeModule not found

See original GitHub issue

After importing i have this error on compilation: React/RCTBridgeModule.h file not found on /node_modules/@nozbe/watermelondb/native/ios/WatermelonDB/SupportingFiles/Bridging.h

Env

 "@nozbe/watermelondb": "0.10.0",
 "react": "16.7.0",
 "react-native": "0.57.8",

Error detailed

fatal error: file '/Users/roger/Documents/Workspace/MyApp-mobile/node_modules/@nozbe/watermelondb/native/ios/WatermelonDB/SupportingFiles/Bridging.h' has been modified since the precompiled header '/Users/roger/Library/Developer/Xcode/DerivedData/MyAppApp-edmewkjuqvjtfbefdabgnihcaibg/Build/Intermediates.noindex/PrecompiledHeaders/Bridging-swift_2Y45WZBKC0E5K-clang_1NVIN0G7H4M8K.pch' was built
note: please rebuild precompiled header '/Users/roger/Library/Developer/Xcode/DerivedData/MyAppApp-edmewkjuqvjtfbefdabgnihcaibg/Build/Intermediates.noindex/PrecompiledHeaders/Bridging-swift_2Y45WZBKC0E5K-clang_1NVIN0G7H4M8K.pch'
/Users/roger/Documents/Workspace/MyApp-mobile/node_modules/@nozbe/watermelondb/native/ios/WatermelonDB/SupportingFiles/Bridging.h:2:9: error: 'React/RCTBridgeModule.h' file not found
#import <React/RCTBridgeModule.h>
        ^
1 error generated.
<unknown>:0: error: failed to emit precompiled header '/Users/roger/Library/Developer/Xcode/DerivedData/MyAppApp-edmewkjuqvjtfbefdabgnihcaibg/Build/Intermediates.noindex/PrecompiledHeaders/Bridging-swift_2Y45WZBKC0E5K-clang_1NVIN0G7H4M8K.pch' for bridging header '/Users/roger/Documents/Workspace/MyApp-mobile/node_modules/@nozbe/watermelondb/native/ios/WatermelonDB/SupportingFiles/Bridging.h'

I tried cleaning buld folder and derived data.

React is linked via cocoapods

  pod 'React', :path => '../node_modules/react-native', :subspecs => [
  'Core',
  'CxxBridge',
  'DevSupport',
  'RCTActionSheet',
  'RCTAnimation',
  'RCTGeolocation',
  'RCTText',
  'RCTWebSocket',
  'RCTNetwork',
  'RCTVibration',
  'RCTSettings',
  'RCTAnimation',
  'RCTLinkingIOS',
  'RCTImage',
  'RCTWebSocket'
  ]

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
radexcommented, Feb 7, 2019

@andr3a88 I think your problem is that since you link React using CocoaPods instead of “traditionally”, React is in a different place. check out the latest pre-release of Watermelon. It has this fix for expo projects: https://github.com/Nozbe/WatermelonDB/pull/227/files — if that doesn’t work, play with header search paths in Xcode, and make sure it has the path to where React resides for you. If such change is necessary, please send a quick PR with the fix

1reaction
radexcommented, Feb 7, 2019

@banduk please send the patch with the header search path fix, and as for the other error — you didn’t follow all the installation steps 😉 https://github.com/Nozbe/WatermelonDB/blob/master/docs/Installation.md

Read more comments on GitHub >

github_iconTop Results From Across the Web

`React/RCTBridgeModule.h` file not found - Stack Overflow
In my case this particular problem happened when I was trying to archive a 0.40+ react-native app for iOS (solution was found here:...
Read more >
React Native ios build error 'React/RCTBridgeModule.h' file ...
Coding example for the question React Native ios build error 'React/RCTBridgeModule.h' file not found.
Read more >
React Native App no longer builds … | Apple Developer Forums
My react native app previously built and ran on a simulator in xcode 11. However sine upgrading to xcode 12.5 i get the...
Read more >
iOS : Build failed 'React/RCTBridgeModule.h' file not found
iOS : Build failed 'React/ RCTBridgeModule.h' file not found [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] iOS ...
Read more >
Fatal error: 'React/RCTBridgeModule.h' file not found
h”) while building iOS archive in Bitrise for react native project and this error is not appearing in my local machine with same...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found