Closed revmischa closed 1 year ago
Confirmed that this was a bug in https://unpkg.com/browse/@aws-sdk/middleware-retry@3.6.1/package.json but resolved in https://unpkg.com/browse/@aws-sdk/middleware-retry@3.40.0/package.json.
A PR @aws-amplify/core
updated @aws-sdk/client-cloudwatch-logs
to ^3.40.0
should resolve this.
/tmp on ☁️ us-east-1
❯ mkdir rn
/tmp on ☁️ us-east-1
❯ cd rn
/tmp/rn on ☁️ us-east-1
❯ git init
/tmp/rn on ☁️ us-east-1
❯ npm init -y
nWrote to /private/tmp/rn/package.json:
{
"name": "rn",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
╭───────────────────────────────────────────────────────────────╮
│ │
│ New major version of npm available! 6.14.15 → 8.1.3 │
│ Changelog: https://github.com/npm/cli/releases/tag/v8.1.3 │
│ Run npm install -g npm to update! │
│ │
╰───────────────────────────────────────────────────────────────╯
/tmp/rn is 📦 v1.0.0 via ⬢ v14.17.6 on ☁️ us-east-1
❯ npm
/tmp/rn is 📦 v1.0.0 via ⬢ v14.17.6 on ☁️ us-east-1
❯ npm install -g npm
/Users/ecclemm/.nvm/versions/node/v14.17.6/bin/npm -> /Users/ecclemm/.nvm/versions/node/v14.17.6/lib/node_modules/npm/bin/npm-cli.js
/Users/ecclemm/.nvm/versions/node/v14.17.6/bin/npx -> /Users/ecclemm/.nvm/versions/node/v14.17.6/lib/node_modules/npm/bin/npx-cli.js
+ npm@8.1.3
added 70 packages from 18 contributors, removed 289 packages and updated 148 packages in 7.163s
/tmp/rn is 📦 v1.0.0 via ⬢ v14.17.6 on ☁️ us-east-1 took 7s
❯ npm i @aws-amplify/core
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uglify-es@3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
added 772 packages, and audited 773 packages in 26s
19 packages are looking for funding
run `npm fund` for details
31 vulnerabilities (8 moderate, 23 high)
To address all issues, run:
npm audit fix
Run `npm audit` for details.
/tmp/rn is 📦 v1.0.0 via ⬢ v14.17.6 on ☁️ us-east-1 took 26s
❯ npm ls react-native
rn@1.0.0 /private/tmp/rn
└─┬ @aws-amplify/core@4.3.4
└─┬ @aws-sdk/client-cloudwatch-logs@3.6.1
└─┬ @aws-sdk/middleware-retry@3.6.1
└─┬ react-native-get-random-values@1.7.0
└─┬ react-native@0.66.2
└─┬ @react-native-community/cli@6.1.0
└── react-native@0.66.2 deduped
Issue is not resolved yet as upgrading the package leads to breaking changes
Hello @revmischa, we are currently blocked on this issue because one of our dependencies brings in the polyfills so we need to wait for the sdk team to fix that. We are also going to postpone removing the react-native dependency in the core package because it would cause breaking changes to the rest of the library. We are working with the react-native team to get a better solution for this.
any updates?
AFAICT this means no users of @aws-amplify/core
can use React 18:
npm ERR! Could not resolve dependency:
npm ERR! peer react@"17.0.2" from react-native@0.66.0
npm ERR! node_modules/react-native
npm ERR! peer react-native@"*" from @react-native-community/cli@6.1.0
npm ERR! node_modules/@react-native-community/cli
npm ERR! @react-native-community/cli@"^6.0.0" from react-native@0.66.0
npm ERR! peer react-native@">=0.56" from react-native-get-random-values@1.7.0
npm ERR! node_modules/react-native-get-random-values
npm ERR! react-native-get-random-values@"^1.4.0" from @aws-sdk/middleware-retry@3.6.1
npm ERR! node_modules/@aws-sdk/middleware-retry
npm ERR! @aws-sdk/middleware-retry@"3.6.1" from @aws-sdk/client-cloudwatch-logs@3.6.1
npm ERR! node_modules/@aws-sdk/client-cloudwatch-logs
npm ERR! 11 more (@aws-sdk/client-cognito-identity, ...)
It seems like this should be a big deal @evcodes ?
Honestly it would be great if @aws-amplify/core
could just not depend on the aws-sdk
at all. That is probably naive, but I don't think I've had an interaction with @aws-amplify
that was not tripped up by aws-sdk
dependency issues.
...Any movement on this? Folks, this is kinda absurd. What sort of Bias for Action or Customer Obsession is this? wtf...
Hello @armenr - as part of our next major version, we are going to be splitting up all dependencies that are react-native specific, to prevent this issue. Apologies this has taken us so long, we are on it. We will provide an update on this issue when our new version is out.
@stephenh - we are also writing our own clients for interacting with AWS services, so that we can produce the smallest bundle size possible, and also prevent some compatibility issues with some of the underlying dependencies.
Thanks for the update, and for all of the hard work @abdallahshaban557 & Amplify team! My complaint/surprise was more about the lack of update/communication than anything else.
I know how hard the Amplify team is constantly working to deliver fixes and new (and useful) things. :)
Looking forward to these updates, they all sound exciting. Thank you! 🥇
Hi @armenr - I understand. We are trying to be a lot better at keeping our community updated - and we will continue to work to improve in that area. Thank you for the kind words, and looking forward to hearing your feedback once we get our new version out!
With the release of the latest major version of Amplify (aws-amplify@>6), this issue should now be resolved! Please refer to our release announcement, migration guide, and documentation for more information.
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Not applicable
Amplify Categories
Not applicable
Environment information
Describe the bug
My project does not nee react-native but it's bring brought in via
@aws-amplify/core
Expected behavior
Maybe declare it as a peer dependency?
Reproduction steps
Install
@aws-amplify/core
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response