React-native-fs: Build error: 'React/RCTImageLoaderProtocol.h' file not found for react native version 0.56

Created on 22 Oct 2019  路  22Comments  路  Source: itinance/react-native-fs

The recent changes to the repo to fix the issue with RCTImageLoader for react native version >= 0.60, are failing builds in version 0.56.

RNFS Version: 2.16.1.

Should we just fix with previous version of the library?

Most helpful comment

Changing
#import <React/RCTImageLoaderProtocol.h>
to
#import <React/RCTImageLoader.h>
fixed the build issue for me

Don't forget to clean your DerivedData folder

All 22 comments

I got that error when I try with react-native version 0.60.6.

RNFS Version: 2.14.1

Same issue
RN: 0.59.9
RNFS: 2.16.1

RNFS_ISSUE

As written in README: for RN < 0.61, install 2.15
and for RN >= 0.61, install 2.16

@itinance
RN: 0.60.5
RNFS: 2.15.0

You mentioned above that i should use 2.15, but i am still getting this error :-(((
Please help

The README says for RN >= 0.57 install RNFS >= 2.13.2, and for RN >= 0.61 install RNFS >= 2.16.0.

It doesn't say that RNFS 2.16.x is not compatible with RN < 0.61.
If that is the case, then the README needs updating to be clearer.

@itinance @grit96
2.15.2 worked well
2.15 didn't

@AnthonyAkentiev are you sure that react-native-fs 2.15.x is installed?

Please double check the include-statement in line 17 at node_modules/react-native-fs/RNFSManager.m

@itinance Please see my prev.comment above.
2.15.2 worked well, thank you!

Changing
#import <React/RCTImageLoaderProtocol.h>
to
#import <React/RCTImageLoader.h>
fixed the build issue for me

Don't forget to clean your DerivedData folder

For RN 0.60.5 use 2.15.2
For RN 0.61 use 2.16

If you are breaking API then you must up MAJOR version! whats wrong with you?

Instead of changing #import statement again again and again, why don't you use a suitable version like @mattslight said !!

Updating to 2.16.1 broke my build .Rolling back to 21.15.2 fixed it. @mattslight thanks!
"react": "^16.9.0", "react-native": "0.60.6", "react-native-fs": "^2.16.1",

/myapp/source/node_modules/react-native-fs/RNFSManager.m:17:9: fatal error:
'React/RCTImageLoaderProtocol.h' file not found

import

    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1 error generated.
````

yarn add [email protected]

This is not working. I'm running:

"react": "16.8.3",
"react-native": "0.61.3",
"react-native-fs": "2.16.1"

It looks like the latest version of RN isn't compatible with RNFS? Not sure if I'm missing something.

Also tried downgrading to 2.15.2, the same issue.

I'm running React Native 0.59.9. Downgrading to 2.14.1 worked for me. Agree that making the readme more clear would be good.

Just to clarify,

this doesn't work: "react-native-fs": "^2.15.2"
and
this works: "react-native-fs": "2.15.2"

removing caret symbol solved it for me & cleaning derivedData
rm -rf ~/Library/Developer/Xcode/DerivedData

Just to clarify,

this doesn't work: "react-native-fs": "^2.15.2"
and
this works: "react-native-fs": "2.15.2"

removing caret symbol solved it for me & cleaning derivedData
rm -rf ~/Library/Developer/Xcode/DerivedData

Work well ! Thanks !

If you are breaking API then you must up MAJOR version! whats wrong with you?

This is a react-native related project. It's literally part of the react-native style guide to make major breaking changes in minor maintenance releases and then poorly documented those changes.

"react": "16.8.3",
"react-native": "0.59.9",
"react-native-fs": "^2.13.2"

still getting error

i have same issue in rn :59/8 and installed all version of rnfs it works correctly in android but in ios get error 'React/RCTImageLoader.h' file not found

I believe this is now fixed in bbafdc122af013b9f8a3998078ed488de81f186d as of v2.16.4

replacing
#import <React/RCTImageLoader.h>
with
#import <React/RCTImage.h>
works to me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

1556173267 picture 1556173267  路  3Comments

wmonecke picture wmonecke  路  3Comments

opoze picture opoze  路  3Comments

PimDeWitte picture PimDeWitte  路  4Comments

let-aurn picture let-aurn  路  3Comments