question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: [@RNC/AsyncStorage]: NativeModule: AsyncStorage is null.

See original GitHub issue

Current behavior

To fix this issue try these steps:

• Run react-native link @react-native-async-storage/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-async-storage.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-async-storage/react-native-async-storage/issues

[Tue Feb 09 2021 12:09:31.370] ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)

These steps are not working infact giving error like autolinking is deprecated

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
jiaxiangchengcommented, Feb 9, 2021

@jiaxiangcheng: Please ask in Expo’s forums. I think you’ll get better answers there. I have no experience with Expo myself.

I have resolved by changing these lines:

const { getDefaultConfig } = require(“metro-config”); -> const { getDefaultConfig } = require(“@expo/metro-config”);

const { resolver: { sourceExts, assetExts }, } = await getDefaultConfig(); -> const { resolver: { sourceExts, assetExts }, } = await getDefaultConfig(__dirname);

Thanks for your idea to fix the problem!!!

1reaction
tido64commented, Feb 9, 2021

@jiaxiangcheng: Please ask in Expo’s forums. I think you’ll get better answers there. I have no experience with Expo myself.

Read more comments on GitHub >

github_iconTop Results From Across the Web

react native - NativeModule: AsyncStorage is null, with @RNC ...
To fix this issue try these steps: -Run `react-native link @react-native-community/async-storage` in the project root. -Rebuild and restart the ...
Read more >
NativeModule: AsyncStorage is null · Issue #768 - GitHub
Error: [@RNC/AsyncStorage]: NativeModule: AsyncStorage is null. To fix this issue try these steps: • Rebuild and restart the app.
Read more >
ERROR Error: [@RNC/AsyncStorage]: NativeModule - Medium
ERROR Error : [@RNC/AsyncStorage]: NativeModule: AsyncStorage is null. Rebuild and restart the app. Run the packager with '--reset-cache' flag.
Read more >
Error ReactNative AsyncStorage is null iOS-React Native
target 'YourApp' do #The line below pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage' target 'YourAppTests' do inherit ...
Read more >
NativeModule: AsyncStorage is null EXPO EAS app - Reddit
Error : [@RNC/AsyncStorage]: NativeModule: AsyncStorage is null EXPO ... AsyncStorage with it: https://react-native-async-storage.github.io/ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found