aws / aws-sdk-js

AWS SDK for JavaScript in the browser and Node.js
https://aws.amazon.com/developer/language/javascript/
Apache License 2.0
7.59k stars 1.55k forks source link

Latest updates to aws-sdk are referring to unpublished package dependency @aws-sdk/credential-provider-http@3.422.0 #4499

Closed CDCR-KevinBaroni closed 12 months ago

CDCR-KevinBaroni commented 12 months ago

Describe the bug

The latest updates to aws-sdk (v2) are referring to an unpublished version of the "credential-provider-http" package dependency. Specifically v2.1467.0 of aws-sdk is referring to the @aws-sdk/credential-provider-http@3.422.0 pacakage dependency which has not been published to registry.npmjs.org. This is causing not found errors during "npm/pnpm install" for a server that uses the aws-sdk (v2) package.

In a Node.js server that has had no changes to its code or dependencies for the last 2 months, simple running "npm/pnpm install" fails with a package not found error on @aws-sdk/credential-provider-http@3.422.0.

Expected Behavior

When running a "pnpm install" for a Node.js server that uses a aws-sdk (v2) package dependency, the install of all packages in the package.json file for a Node.js server should succeed.

Current Behavior

"pnpm install" for a Node.js server that uses a aws-sdk (v2) package dependency is failing with the following error:

ERR_PNPM_FETCH 404  GET https://registry.npmjs.org/@aws-sdk%2fcredential-provider-http/-/credential-provider-http-3.422.0.tgz: Not Found - 404

Reproduction Steps

Add the following dependencies in your package.json files as these dependencies require aws-crypto which appears to require aws-sdk/credential-providers: "mongodb": "4.15.0", "mongodb-core": "3.2.7",

Delete your node_modules/ folder and pnpm-lock.yaml file. Run "pnpm install"

Possible Solution

Long-term solution: publish @aws-sdk/credential-provider-http@3.422.0 to https://registry.npmjs.org

Workaround until the above is done: add the previous version of aws-sdk/credential-providers to your package.json file (@aws-sdk/credential-providers@3.421.0).

Additional Information/Context

No response

SDK version used

aws-sdk v2

Environment details (OS name and version, etc.)

Ubuntu 22.02.3 LTS

ajredniwja commented 12 months ago

Hey @CDCR-KevinBaroni thanks for opening this issue, I believe the V2 is not using this dependency. With V3 we were having some issues see: https://github.com/aws/aws-sdk-js-v3/issues/5276

CDCR-KevinBaroni commented 12 months ago

Hi @ajredniwja, thanks for getting back to me. Interestingly enough, if you simply perform an "npm install aws-sdk" (the v2 pkg), it pulls in the @aws-sdk/credential-provider-http@3.422.0 dependency.

Also, it appears that the latest NPM publication of v3.423.0 has resolved the reported issue for us. You may want to notify the watchers of issue #5276 of this as well.

ajredniwja commented 12 months ago

It might be that some other package has a dependency on because @aws-sdk/credential-provider-http is not listed in the package.json But Im glad you dont see the issue anymore so I will close this issue now.

Thanks