Skip to content

Duplicated dependency on Expo SDK 54: @react-native-async-storage/async-storage@2.2.0 #1367

Description

@BrodaNoel

Expected Behavior

npx expo-doctor should not throw an error

Current Behavior

npx expo-doctor is throwing an error:

✖ Check that no duplicate dependencies are installed
Your project contains duplicate native module dependencies, which should be de-duplicated.
Native builds may only contain one version of any given native module, and having multiple versions of a single Native module installed may lead to unexpected build errors.
Found duplicates for @react-native-async-storage/async-storage:
  ├─ @react-native-async-storage/async-storage@2.2.0 (at: node_modules/@react-native-async-storage/async-storage)
  └─ @react-native-async-storage/async-storage@1.24.0 (at: node_modules/@amplitude/analytics-react-native/node_modules/@react-native-async-storage/async-storage)

This is not a simple warning. This is actually duplicating the pre-builded dependencies leading on higher build sizes, and problems with different singletones/instances of async-stores at the same time.

Possible Solution

Update to @react-native-async-storage/async-storage@2.2.0, which is the stable since Expo SDK 54

Steps to Reproduce

Just add this dependency on an Expo project with SDK 54, and then run npx expo-doctor

Environment

"@amplitude/analytics-react-native": "^1.5.16",
"expo": "^54.0.20",
"@react-native-async-storage/async-storage": "2.2.0",

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions