react-native-fs: Failed to build with RN 0.61 React/RCTImageLoader.h file not found

RNFSManager.m fatal error: React/RCTImageLoader.h file not found during IOS build

Looks like RCTImageLoader is removed from React Native Libraries. Anyone can suggest a permanent / temporary fix?

Same issue is observed for other libraries too. https://github.com/ivpusic/react-native-image-crop-picker/issues/692#issuecomment-529017012

I have tried adding RCTImage to RNFS.podspec file manually but i could not succeed to prevent failure.

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 8
  • Comments: 15 (2 by maintainers)

Commits related to this issue

Most upvoted comments

#import <React/RCTImageLoaderProtocol.h> => #import <React/RCTImageLoader.h>

[Resolved]

  1. Clean the derived data folder.
  2. Make sure the dependencies are matching with the installed version of RN.
  3. Clean and build, it works.
#if __has_include(<React/RCTImageLoader.h>)
#import <React/RCTImageLoader.h>
#else
#import <React/RCTImageLoaderProtocol.h>
#endif

This worked for me

fresh project created with

npx react-native init avid --template react-native-template-typescript@6.2.0

it uses react-native 0.61.2

I install latest react-native-fs

    "react-native-fs": "^2.16.2",

Still fails to build

myProject/node_modules/react-native-fs/RNFSManager.m:17:9: 'React/RCTImageLoaderProtocol.h' file not found