EXPO Error: [@RNC/AsyncStorage]: NativeModule: AsyncStorage is null.
See original GitHub issueWhat happened?
Hi, I use expo to build my app, I just recently upgrade from SDK 38 to SDK 41, I looked at the depreciations… But I keep getting this error
`Error: [@RNC/AsyncStorage]: NativeModule: AsyncStorage is null.
To fix this issue try these steps:
• Run react-native link @react-native-community/async-storage in the project root.
• Rebuild and restart the app.
• Run the packager with --reset-cache flag.
• If you are using CocoaPods on iOS, run pod install in the ios directory and then rebuild and re-run the app.
• If this happens while testing with Jest, check out docs how to integrate AsyncStorage with it: https://react-native-community.github.io/async-storage/docs/advanced/jest
If none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-async-storage/issues
Invariant Violation: “main” has not been registered. This can happen if:
Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project. A module failed to load due to an error and AppRegistry.registerComponent wasn’t called.` I tried customizing metro.config.js (I created this file as I didn’t have it before and tried to tweak it with response I say), But I noticed that my expo actually came with babel.config.js (I don’t know if that’s a problem). I have tried all the tweak I saw and its not working still. Please I need urgent help as I have a deadline.
Version
1.13.0
What platforms are you seeing this issue on?
- Android
- iOS
- macOS
- Windows
- web
System Information
System:
OS: Windows 10 10.0.16299
CPU: (4) x64 Intel(R) Core(TM) i3-5010U CPU @ 2.10GHz
Memory: 1.96 GB / 7.88 GB
Binaries:
Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 8.1.3 - ~\AppData\Roaming\npm\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowAllTrustedApps: Enabled
Versions: 10.0.18362.0
IDEs:
Android Studio: Version 4.1.0.0 AI-201.8743.12.41.6953283
Visual Studio: 16.6.30204.135 (Visual Studio Community 2019)
Languages:
Java: 15.0.1 - C:\Program Files\Java\jdk-15.0.1\bin\javac.EXE
Python: 3.10.0 - C:\Python310\python.EXE
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: ^0.63.4 => 0.63.4
react-native-windows: Not Found
npmGlobalPackages:
*react-native*: Not Found
Steps to Reproduce
- Upgrade EXPO from 39 to 41
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7
Top Related StackOverflow Question
We use aws-amplify for our auth, which depends on @react-native-community/async-storage. However, we get this error if we install @react-native-community/async-storage. Is there any way to use the library in a managed project? We’d really prefer not to eject or have to change auth providers.
i solved the issue this way. you can also try