When running a basic app that uses react-native-simple-store I get the following error (the same as this unsolved question):
undefined is not an object (evaluating 'RCTAsyncStorage.multimerge')
<unkown>
AsyncStorage.js:325:21
...
Digging into AsyncStorage.js I find that the issue is here:
// Not all native implementations support merge.
if (!RCTAsyncStorage.multiMerge) {
delete AsyncStorage.mergeItem;
delete AsyncStorage.multiMerge;
}
RCTAsyncStorage is not undefined. The attempt to define RCTAsyncStorage comes at the beginning of the same file.
const NativeModules = require('../BatchedBridge/NativeModules');
// Use RocksDB if available, then SQLite, then file storage.
const RCTAsyncStorage = NativeModules.AsyncRocksDBStorage ||
NativeModules.AsyncSQLiteDBStorage ||
NativeModules.AsyncLocalStorage;
Finally, I checked NativeModules.AsyncRocksDBStorage, NativeModules.AsyncSQLiteDBStorage, and NativeModules.AsyncLocalStorage—surely enough, all of them were undefined. The file from which they are supposed to be loaded (NativeModules) is a bit difficult to understand, so I stopped tracing there.
Please let me know if you know what I could be doing wrong!
from React-Native Simple Store Error: Unable to load RocksDB, SQLite, or AsyncLocalStorage
No comments:
Post a Comment