Skip to content

fix(middleware-retry): make react-native-get-random-values optional #2108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

fix(middleware-retry): make react-native-get-random-values optional #2108

wants to merge 2 commits into from

Conversation

tuarrep
Copy link

@tuarrep tuarrep commented Mar 6, 2021

Issue

#1536

Description

Mark react-native-get-random-values as optional peer dependency to prevent install on non React Native environments.

Testing

N/A


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@AllanZhengYP AllanZhengYP self-requested a review March 8, 2021 18:01
Cruikshanks added a commit to DEFRA/sroc-charging-module-api that referenced this pull request Mar 22, 2021
To support sending files to AWS S3 we recently added a [Send File To S3 service](#293). As part of that change we added `@aws-sdk/client-s3` as a dependency.

Unfortunately, we got hit with 2 things at once. `client-s3` has a dependency on a middleware package that has a **peer** dependency on `react-native`.

Also, npm v7 is out and that automatically installs peer dependencies, even when not really needed.

Until aws/aws-sdk-js-v3#2108 is merged it looks like the workaround is to use the command [`npm install --only=production --legacy-peer-deps`](aws/aws-sdk-js-v3#2150 (comment)). This tells npm to use pre-v7 behaviours and not automatically install peer dependencies.
Cruikshanks added a commit to DEFRA/sroc-charging-module-api that referenced this pull request Mar 23, 2021
To support sending files to AWS S3 we recently added a [Send File To S3 service](#293). As part of that change, we added `@aws-sdk/client-s3` as a dependency.

Unfortunately, we got hit with 2 things at once. `client-s3` has a dependency on a middleware package that has a **peer** dependency on `react-native`.

Also, npm v7 is out and that automatically installs peer dependencies, even when not really needed.

Until aws/aws-sdk-js-v3#2108 is merged it looks like the workaround is to use the command [`npm install --legacy-peer-deps`](aws/aws-sdk-js-v3#2150 (comment)). This tells npm to use pre-v7 behaviours and not automatically install peer dependencies.
@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

  • CodeBuild project: sdk-staging-test
  • Commit ID: 2277706
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@trivikr
Copy link
Member

trivikr commented Mar 29, 2021

Resolving in favor of #2191

Thank you

@tuarrep
Copy link
Author

tuarrep commented Mar 29, 2021

Admittedly, better than mine ;)

@tuarrep tuarrep closed this Mar 29, 2021
@tuarrep tuarrep deleted the fix/react-dep branch March 29, 2021 16:57
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants