Closed vkarkhanis closed 1 week ago
Alright, so here is what was needed. In case of Expo Go too, you will need to rebuild because the native code needs to be bundled
So in case of Android, I executed:
expo run:android
It took a long time to build first time but subsequent builds were normal. Preferably connect an actual device on USB.
Once built, everything worked like a charm. Make sure, earlier version of App is uninstalled, else you may face version incompatibility.
Once re-built, subsequently you can work in development mode by executing expo start
What happened?
I am trying to use Firebase with React Native and using expo. If I use following code I get a warning asking me to use ReactNativeAsyncStorage:
Howeve if I install @react-native-async-storage/async-storage, and use it as below:
my app does not start and instead throws an error:
My dependencies in package.json are as below: "dependencies": { "@react-native-async-storage/async-storage": "1.23.1", "@react-navigation/bottom-tabs": "^6.5.20", "@react-navigation/core": "^6.4.16", "@react-navigation/native": "^6.1.17", "@react-navigation/stack": "^6.3.29", "axios": "^1.7.2", "expo": "~51.0.8", "expo-dev-client": "~4.0.14", "expo-status-bar": "~1.12.1", "firebase": "^10.12.2", "lodash": "^4.17.21", "react": "18.2.0", "react-native": "0.74.1", "react-native-gesture-handler": "~2.16.1", "react-native-get-random-values": "^1.11.0", "react-native-safe-area-context": "4.10.1", "react-native-screens": "3.31.1", "react-native-toast-message": "^2.2.0", "uuid": "^9.0.1" }, "devDependencies": { "@babel/core": "^7.20.0", "@types/lodash": "^4.17.5", "@types/react": "~18.2.45", "typescript": "~5.3.3", "@types/axios": "^0.14.0", "@types/uuid": "^9.0.8", }, "private": true
This is happening on Android device. Based on lot of threads related to this, I have tried cleaning node_modules and yarn.lock multiple times but to no avail. I have also made sure I installed @react-native-async-storage/async-storage using:
npx expo install @react-native-async-storage/async-storage
I have tried both yarn and npm Nothing seems to be working
Version
1.23.1
What platforms are you seeing this issue on?
System Information
Steps to Reproduce
npm start -- --reset-cache