Search code examples
react-nativeexporeact-native-web

AsyncStorage module not found in /expo/build/Notifications


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.


Solution

  • 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