I'm getting the below mentioned error when i try run application in the web mode.
/node_modules/expo/build/Notifications/Notifications.js
Module not found: Can't resolve 'react-native-web/dist/exports/AsyncStorage' in '/Users/i322865/node_modules/expo/build/Notifications'
I'm using the latest expo(0.36, same error i faced when i was using 0.35 version as well) and react native web 0.12.0-rc.1. Please help to solve this issue and let me know if you require any further details.
React Native on Android actually uses SQLite to back up the AsyncStorage API. The database file is /data/data/<your_app>/databases/RKStorage on your device/emulator. Keys and values are stored in a table named catalystLocalStorage .
AsyncStorage is an unencrypted, asynchronous, persistent, key-value storage system that is global to the app. It should be used instead of LocalStorage. It is recommended that you use an abstraction on top of AsyncStorage instead of AsyncStorage directly for anything more than light usage since it operates globally.
This module (AsyncStorage) is not available on react-native-web : ^0.12.
If you need to use the AsyncStorage you can use the version: "react-native-web": "0.11.7",
PS: you can check updates on that subject at this issue: https://github.com/necolas/react-native-web/issues/1515
The official position is:
Use 0.11 until the community packages add web support.
They've known this was coming for 9 months react-native-community/async-storage#52
Regards
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With