kfiroo / react-native-cached-image

CachedImage component for react-native
MIT License
938 stars 470 forks source link

Error on hermes engine: DocumentDir of null #210

Open TTATPuOT opened 3 years ago

TTATPuOT commented 3 years ago

Hello! I am try to add this library to my project with hermes engine. But when i add ImageCacheProvider to wrap my app, i have an error;

Error: Requiring module "node_modules/react-native-cached-image/index.js", which threw an exception: TypeError: Cannot read property 'DocumentDir' of null, js engine: hermes

Example wrapper:

<ImageCacheProvider urlsToPreload={[]} onPreloadComplete={() => console.log('Images preloaded')}>
... APP CODE HERE ...
</ImageCacheProvider>

React Native version: 0.64.1 Tested on Android 11 (Samsung S10, One UI 3.1)