Open ankon opened 2 months ago
Having the same issue with latest version aws-sdk version 3.624.0. Need to upgrade to use latest as it has change for fast-xml-parser but then fails on peer dependencies. Any options please?
If anything, you could use yarnrc.yml
and packageExtensions
to patch up incorrectly defined dependencies.
Here's are my error messages, a bit more detailed:
Package @aws-sdk/credential-provider-node@npm:3.622.0 is requested to provide @aws-sdk/client-sts by its descendants
@aws-sdk/credential-provider-node@npm:3.622.0
├─ @aws-sdk/credential-provider-ini@npm:3.622.0 [a1277] (via ^3.622.0)
│ └─ @aws-sdk/credential-provider-web-identity@npm:3.621.0 [a1277] (via ^3.621.0)
└─ @aws-sdk/credential-provider-web-identity@npm:3.621.0 [a1277] (via ^3.621.0)
✘ Package @aws-sdk/credential-provider-node@npm:3.622.0 does not provide @aws-sdk/client-sts.
Package @aws-sdk/credential-provider-sso@npm:3.622.0 is requested to provide @aws-sdk/client-sso-oidc by its descendants
@aws-sdk/credential-provider-sso@npm:3.622.0
└─ @aws-sdk/token-providers@npm:3.614.0 [aa9ff] (via ^3.614.0)
✘ Package @aws-sdk/credential-provider-sso@npm:3.622.0 does not provide @aws-sdk/client-sso-oidc.
As @wojtekmaj suggested, adding the dependencies in .yarnrc.yml will solve the issue temporarily while we wait for a fix, you can keep working through the missing dependency errors and adding them. For example my packageExtension is as follows:
nodeLinker: pnp
yarnPath: .yarn/releases/yarn-4.4.1.cjs
packageExtensions:
"@aws-sdk/credential-provider-node@>=3.609.0":
dependencies:
"@aws-sdk/client-sts": "*"
"@aws-sdk/credential-provider-sso@>=3.609.0":
dependencies:
"@aws-sdk/client-sso-oidc": "*"
Checkboxes for prior research
Describe the bug
We've been using Yarn's PnP linking to speed up builds and generally try to enforce strict dependencies.
Recently we noticed that builds using
esbuild
failed when not marking the @aws-sdk packages as external:Building with AWS SDK v3 as external:
Building with AWS SDK v3 bundled into the result:
SDK version number
@aws-sdk/client-sts@3.609.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v20.11.1
Reproduction Steps
https://github.com/ankon/20240705-aws-sdk-v3-peer-deps:
Run
yarn
to reproduce peer dependency warnings; thenyarn build
to build using bundling oryarn build-external
to build with the AWS SDK marked as external.Observed Behavior
See description: peer-dependency warnings, build failures.
Expected Behavior
yarn install
properly installs without warnings.--external:@aws-sdk/*
and bundled cases.Possible Solution
No response
Additional Information/Context
This seems to come up a lot of times, our quick search found: