NativeModule: AsyncStorage is null, with @RNC/AsyncStorage : <p>I'm working on a React Native project created with Expo. I've been using regular old <code>AsyncStorage</code>, importing from <code>react-native</code>, and all has been well.</p>

<p>In looking up how to mock <code>AsyncStorage</code> for testing, I saw that <code>react-native-community/react-native-async-storage</code> has its own mock built in. </p>

<p>So I installed the community plugin with <code>yarn add</code> and switched out all my import statements.</p>

<p>When I run my app, I'm getting an error (which I'm retyping myself, excuse some ellipses): </p>

<pre><code>[@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...
-If this happens while testing with Jest...
</code></pre>

<p>So I tried running <code>react-native link @react-native-community/async-storage</code> but I keep getting this error:</p>

<pre><code>Something went wrong while linking. Error: Cannot read property 'pbxprojPath' of null
</code></pre>

<p>Some research showed me that Expo apps can't (and don't need to) link. </p>

<p>I tried <code>npm start --clearCache</code> to no avail.</p>

<p>Also, I don't have an <code>ios</code> (or <code>android</code>) folder in my project. This has always been kind of confusing for me because I see it referenced all over the place. I run my app in the Simulator/Emulator (and device) through the Expo app. Once I tried ejecting and there were problems. So, I don't have an <code>ios</code> folder.</p>

<p>(I'll go back to using the old native <code>AsyncStorage</code> from <code>react-native</code> and creating a mock myself, but I'd like to know how to solve this, and similar problems that may arise in the future.)</p>
