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.

'React/RCTDefines.h' file not found

See original GitHub issue

Hi,

Installed Versions:

  • “react-native”: “0.61.2”
  • “rn-fetch-blob”: “^0.11.2”

we recently upgraded from react-native version 0.59 to 0.61 and now the rn-fetch-blob library no longer works with XCode, we get the following errors when trying to build the project:

Screenshot 2019-10-11 at 5 47 33 PM

In the error stack trace it says that the error originates from node_modules/rn-fetch-blob/ios/RNFetchBlob/RNFetchBlob.h:22

Any ideas or pointers on how we can solve this issue?

Thanks in advance for your support.

Best regards, Thomas

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:8
  • Comments:14

github_iconTop GitHub Comments

211reactions
infostreamscommented, Nov 13, 2019

Ok, I managed to fix it (for me, at least). What you do is the following:

  1. Go to Project navigator > Libraries > RNFetchBlob.xcodeproj
  2. Click on Build Settings and then the first item under “Targets”
  3. Scroll down to ‘Search Paths’
  4. Double click to edit the ‘Header Search Paths’
  5. Add the following entry (click ‘+’): ${SRCROOT}/../../../ios/Pods/Headers. Make sure to set it to recursive.
  6. Clean (cmd + shift + K) and re-build (cmd + B)

Repeat for other libraries that complain about missing React/<whatever>.h files, perhaps with differing amounts of ../ before the ios/Pods/Headers/

4reactions
herstandcommented, Nov 4, 2019

@josectobar Where are you adding that workaround? If I replace the error line in the OP with that, I just get new errors ('React/RCTAssert.h' file not found).

Read more comments on GitHub >

github_iconTop Results From Across the Web

'React/RCTDefines.h' file not found from ... - GitHub
I upgraded react-native to version 0.61.2, and did rm -rf Pods, rm -rf Podfile.lock and then pod install, then open xcode with ...
Read more >
<React/RCTDefines.h> file not found - Stack Overflow
When I add one library, it imports "RCTBridgeModule.h" and that imports React/RCTDefines.h that is not found. I am stuck... – iiro. Jan 9 ......
Read more >
React Native SDK Troubleshooting - Visual Studio App Center
'React/RCTDefines.h' file not found. This error appears when RN core libraries aren't referenced correctly, which can be caused by different ...
Read more >
iOS : React/RCTDefines.h file not found - YouTube
iOS : React / RCTDefines. h file not found [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] iOS : React/RCTDefines.h file ...
Read more >
[iOS] Build is failing with 'React/RCTDefines.h' file not found
We have a successful build of an app using ExpoKit. Trying to add this module had various issues we have solved, but we...
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 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