Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

864
Views
Error: Unable to resolve module @react-native-community/async-storage IOS

I am trying to run my react native project In my IOS device. I start my server with npx react-native start then I start my app with Xcode. And I get this error:

error: Error: Unable to resolve module @react-native-community/async-storage from /Users/nicolelopez/dev/LeksPlay/src/Core/onboarding/utils/AuthDeviceStorage.js: @react-native-community/async-storage could not be found within the project or in these directories:
  node_modules
  ../../node_modules

If you are sure the module exists, try these steps:
 1. Clear watchman watches: watchman watch-del-all
 2. Delete node_modules and run yarn install
 3. Reset Metro's cache: yarn start --reset-cache
 4. Remove the cache: rm -rf /tmp/metro-*
> 1 | import AsyncStorage from '@react-native-community/async-storage'
    |                           ^
  2 |
  3 | const SHOULD_SHOW_ONBOARDING_FLOW = 'SHOULD_SHOW_ONBOARDING_FLOW'

what I have tried:

  1. I have followed the commands I get In the error message:
 1. Clear watchman watches: watchman watch-del-all
 2. Delete node_modules and run yarn install
 3. Reset Metro's cache: yarn start --reset-cache
 4. Remove the cache: rm -rf /tmp/metro-*
  1. i have deleted node_modules and my package.lock.json and have re-installed yarn and done a pod install.

  2. i have tried to restart the computer

  3. i have tried to do a yarn add @react-native-community/async-storage

  4. i am running on node 14 - because I have run in to similar issues with a higher version of node.

  5. i am running Xcode in Rosetta mode - since I am on a Mac M1.

  6. i have tried to change my AsyncStorage import to import AsyncStorage from '@react-native-async-storage/async-storage';

  7. I have also tried to add pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage'

but they all result in the same issue - with is the error code I posted. It gets no different no matter what I try. I am really new to react native, this may be a common issue but I can't seem to find anything that helps.

about 4 years ago · Juan Pablo Isaza
3 answers
Answer question

0

You should use the proper package called @react-native-async-storage/async-storage.

The one you are using is deprecated, check it out on : https://www.npmjs.com/package/@react-native-community/async-storage

deprecated @react-native-community/async-storage

Having the two will lead to issues.

If the issue still persist, try to clear all the cached, there is a good tool that will help you clean your react native project: https://github.com/taboulot/rn-game-over

npx rn-game-over --all

If you still have the issue afterward, please update your question with the new detail.

about 4 years ago · Juan Pablo Isaza Report

0

From the usage documentation, it looks like you're importing Async Storage incorrectly. You should be importing from @react-native-async-storage and not from @react-native-community. Further, you seem to be confusing the two packages. Ensure you've completed the relevant installation steps as well.

To install the correct package:

yarn add @react-native-async-storage/async-storage

And to import Async Storage:

import AsyncStorage from '@react-native-async-storage/async-storage';
about 4 years ago · Juan Pablo Isaza Report

0

as written in the documentation, it's not using @react-native-comunity. It means you should install the react-native-async-storage with :

npm install @react-native-async-storage/async-storage

or

yarn add @react-native-async-storage/async-storage

and not

npm install @react-native-community/async-storage

and if you got an issue or error while using the package, here's the code I tried on my project to solve the problem:

rm -rf $TMPDIR/metro-* && rm -rf $TMPDIR/haste-* && watchman watch-del-all && yarn cache clean --force && rm -rf ios/build && rm -rf node_modules/

i got the solution from here https://stackoverflow.com/a/67865721/8367675

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!