-
Notifications
You must be signed in to change notification settings - Fork 634
Description
Checkboxes for prior research
- I've gone through Developer Guide and API reference
- I've checked AWS Forums and StackOverflow.
- I've searched for previous similar issues and didn't find any solution.
Describe the bug
I’ve encountered intermittent ETARGET
errors when resolving dependencies for @aws-sdk
packages. It appears to be caused by a mismatch in package publishing and dependency resolution. Specifically, AWS SDK packages reference other workspace packages using *
, which appears to take the latest version. In some cases, this results in dependencies referencing versions that haven’t yet been published to npmjs.com.
Here’s an example of the issue:
➜ npm ls @aws-sdk/credential-provider-ini
<redacted>
└─┬ @aws-sdk/[email protected]
└─┬ @aws-sdk/[email protected]
└── @aws-sdk/[email protected]
@aws-sdk/client-secrets-manager published 4 hours ago
@aws-sdk/credential-provider-node published 3 hours ago
@aws-sdk/credential-provider-ini published 3 hours ago
From the above, @aws-sdk/client-secrets-manager
is published earlier and references exact versions of @aws-sdk/credential-provider-node
and @aws-sdk/credential-provider-ini
that haven’t been published yet. This creates a window of time where dependency resolution breaks.
Relevant package.json
files:
Regression Issue
- Select this option if this issue appears to be a regression.
SDK version number
@aws-sdk/[email protected]
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
18.20.8
Reproduction Steps
I'm not sure what causes the delay for some packages when publishing. But that delay is when this issue would present itself.
Observed Behavior
npm error code ETARGET
npm error notarget No matching version found for @aws-sdk/[email protected].
npm error notarget In most cases you or one of your dependencies are requesting
npm error a package version that doesn't exist.
Expected Behavior
Dependency resolution to complete successfully.
Possible Solution
Sequence package publishing so that dependencies are published before the packages that consume them.
Additional Information/Context
No response