Build Successful, but always got error like below even after I run react-native link @react-native-community/async-storage.
For RN 0.60.0, we do not need to run the link command for native modules, so i get error after I run react-native link ...:
error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually:
- @react-native-community/async-storage (to unlink run: "react-native unlink @react-native-community/async-storage")
For RN 0.60.0, we do not need to run the link command for native modules.
Init a project with react-native 0.60.0 ...
Thanks.
Ah, it looks like because the react-native-cli autolinking error: :ReactNative:Automatic import of native modules failed. https://github.com/react-native-community/cli/issues/470
The error tells you to _unlink_ manually linked modules if using autolinking (this module is supported, but the docs are not updated yet), so they don't collide and cause issues in future when upgrading. Can we make it more readable for you?
I ran into the same error AsyncStorage is null error when migrating our test app to RN 0.60.0 today.
I resolved the issue by running react-native unlink @react-native-community/async-storage and cd ios && pod install again.
Hope that unlink fixed it for ya, @Riant . Going to add instructions in the docs for RN 0.60+
Most helpful comment
I ran into the same error
AsyncStorage is nullerror when migrating our test app to RN 0.60.0 today.I resolved the issue by running
react-native unlink @react-native-community/async-storageandcd ios && pod installagain.