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

See original GitHub issue

Hello Guys, am new to react native i just facing a new problem which i cannot understand what and why its happening ? any one help me with this, I was just try to use AsyncStorage for local storage and its just working fine when i import the AsyncStorage from react-native like : import { AsyncStorage } from ‘react-native’; (its working fine )

But when i try to use by import the AsyncStorage from @react-native-community/async-storage like :

import AsyncStorage from ‘@react-native-community/async-storage’;

it produce error like :

[@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 --clearCache flag.

• If you are using CocoaPods on iOS, run pod install in the ios directory and then rebuild and re-run the app.

Why it is Happning with this import ? and I forget to tell that I also run the link command as

react-native link @react-native-community/async-storage after installing Still not working why ?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:67 (20 by maintainers)

github_iconTop GitHub Comments

98reactions
krizzucommented, Apr 24, 2019

Hey @santhanakrishnanstark

Looks like you forgot to re-compile your app with react-native run-android or react-native run-ios (dependending on your target platform).

Let me know if that helped.

thanks.

38reactions
krizzucommented, Apr 24, 2019

@IvanFMt

If you’re using expo, you cannot add this package. Use whatever expo gives you (and ignore the warning about deprecation).

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