Skip to content

Conversation

@sammoore
Copy link
Member

@sammoore sammoore commented Apr 2, 2024

Description

@react-native-async-storage/async-storage has a strict peer dependency, i.e. a max version, of React Native it states it is compatible with. This isn't an issue for most package managers, just a warning, but for npm >= 7 peer dependencies are installed and so their versions must match for the installation to succeed.

The newer version of @react-native-async-storage/async-storage recommended by the Expo CLI/bundler updates the peer dependencies and now allows any version of react-native >=0.60 <1.0, rather than setting a maximum version.

Related Issue

npm issue posted in Discord

Motivation and Context

npm install is broken without npm install --legacy-peer-deps, both of which break other things. This fixes plain npm install.

How Has This Been Tested?

Note: You must selected Supabase as the auth provider in order for the offending package to be included in the generated project.

Run npx create-expo-stack@latest and update the package.json with the new version of @react-native-async-storage/async-storage (1.21.0), then running the following command to do everything the CLI would normally do if npm install originally succeeded during project generation:

npm install && npm run format && git add package-lock.json && git commit -a --amend --no-edit

You can also run the CLI from the git repository after pulling this branch.

Tested with Tamagui & NativeWind.

Screenshots (if appropriate):

N/A

@sammoore sammoore requested a review from danstepanov April 2, 2024 18:32
@changeset-bot
Copy link

changeset-bot bot commented Apr 2, 2024

🦋 Changeset detected

Latest commit: 3b9ce24

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-expo-stack Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Apr 2, 2024

@sammoore is attempting to deploy a commit to the ronin-tech Team on Vercel.

A member of the Team first needs to authorize it.

@danstepanov danstepanov merged commit bc891da into roninoss:main Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants