Open ilibilibom opened 4 years ago
This one is important
Facing same issue when add react-native-cached-image
Invariant Violation: NetInfo has been removed from React Native. It can now be installed and imported from 'react-native-netinfo' instead of 'react-native'.
@hardikramoliya - sadly this library didn't work for me. This one did: https://github.com/DylanVann/react-native-fast-image
In file CachedImage.js
remove import of NetInfo from react native to.
import NetInfo from "@react-native-community/netinfo";
In file
CachedImage.js
remove import of NetInfo from react native to.
import NetInfo from "@react-native-community/netinfo";
Is there a PR in? Can you please reference if so?
Right now using https://github.com/ds300/patch-package to remedy
I am still waiting for a solution for this 😕
Denifer please use @prakashw3expert 's answer.
Ideally you can use https://github.com/ds300/patch-package to create a patch that will be reapplied after each reinstall of react-native-cached-image
@DeniferSantiago Open react-native-cached-image from node modules You need To change manually into this library Open CachedImage.js Remove Netinfo from react native You need to import NetInfo from “@react-native-community/netinfo”; from this and one more you have to do in it open utils folder and change const RNFetchBlob = require(‘react-native-fetch-blob’).default; to import RNFetchBlob from ‘rn-fetch-blob’; This is only solution of this issue
Hi When calling
CachedImage
I'm getting the following error:This is my code: <CachedImage source={{uri: imageUrl}} style={{flex: 1, width: null, height: null}} />