[cli] fix npm >= 7 installation due to strict peer dependencies
          #236
        
          
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Description
@react-native-async-storage/async-storagehas 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 fornpm >= 7peer dependencies are installed and so their versions must match for the installation to succeed.The newer version of
@react-native-async-storage/async-storagerecommended by the Expo CLI/bundler updates the peer dependencies and now allows any version ofreact-native >=0.60 <1.0, rather than setting a maximum version.Related Issue
npmissue posted in DiscordMotivation and Context
npm installis broken withoutnpm install --legacy-peer-deps, both of which break other things. This fixes plainnpm 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@latestand update thepackage.jsonwith 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 ifnpm installoriginally succeeded during project generation:npm install && npm run format && git add package-lock.json && git commit -a --amend --no-editYou can also run the CLI from the git repository after pulling this branch.
Tested with Tamagui & NativeWind.
Screenshots (if appropriate):
N/A