Amplify React Native dependency incompatible with latest version of react-native #10017
Closed
3 tasks done
Labels
React Native
React Native related issue
Before opening, please confirm:
JavaScript Framework
React Native
Environment information
Describe the bug
Customers are unable to install aws-amplify via npm into React Native applications using the latest version of react-native@0.69.0 released 6/22/22.
React Native 0.69.0 updated its React dependency to react@18.x. One of the AmplifyJS React Native dependencies react-native-picker/picker doesn't yet support this version per its peer dependency list.
We should explore whether we can provide a short term resolution to customers until the picker team updates its peer dep. It would be worth opening a GitHub issue in their repo requesting that change.
As a workaround, customers can use the --legacy-peer-deps flag when using npm install to ignore peer dependency warnings.
Note: this issue is specific to customers installing aws-amplify via npm at version >= 7. Customers using yarn will not experience this issue.
Expected behavior
It should be possible to install
aws-amplify
into a new React Native project using the latest version of RN.Reproduction steps
$ npx react-native@latest init amplify_rn $ cd amplify_rn $ npm install aws-amplify aws-amplify-react-native amazon-cognito-identity-js @react-native-community/netinfo @react-native-async-storage/async-storage @react-native-picker/picker
Workarounds
npm install @react-native-picker/picker --legacy-peer-deps
npx react-native@0.68.0 init $PROJECTNAME --version 0.68.0
The text was updated successfully, but these errors were encountered: