6

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.

coders
  • 719
  • 1
  • 11
  • 35

1 Answers1

6

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

Deivison Sporteman
  • 2,334
  • 1
  • 19
  • 22
  • Thank you. I will check and let you know – coders Jan 04 '20 at 04:53
  • Hello. I added the dependency "react-native-web": "0.11.7", in my package.json and I still get the error "Attempted import error: 'AsyncStorage' is not exported from 'react-native-web/dist/index'.". I guess it is the same issue as above. Do you know what could be my issue? – Carloshf Jan 13 '21 at 14:05