Skip to content
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

v3.377.0 release is broken (@smithy/hash-stream-node is not declared as a dependency) #5014

Closed
3 tasks done
klippx opened this issue Jul 26, 2023 · 11 comments
Closed
3 tasks done
Assignees
Labels
bug This issue is a bug. closed-for-staleness p0 This issue is the highest priority

Comments

@klippx
Copy link

klippx commented Jul 26, 2023

Checkboxes for prior research

Describe the bug

Upgraded to v3.377.0 and CI is breaking in specs and smoke test container due to error in @smithy/hash-stream-node

We are using renovate and we are upgrading on almost every release you do. So far each has worked, up until this one. We are an ESM project.

FAIL create-server/index.spec.ts
  ● Test suite failed to run

    Cannot find module '@smithy/hash-stream-node' from '../../node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js'

    Require stack:
      /home/runner/work/graphql-federation-mono/graphql-federation-mono/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js
      /home/runner/work/graphql-federation-mono/graphql-federation-mono/node_modules/@aws-sdk/client-s3/dist-cjs/S3Client.js
      /home/runner/work/graphql-federation-mono/graphql-federation-mono/node_modules/@aws-sdk/client-s3/dist-cjs/index.js

      at Resolver._throwModNotFoundError (../../node_modules/jest-resolve/build/resolver.js:427:11)
      at Object.<anonymous> (../../node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js:13:28)
      at Object.<anonymous> (../../node_modules/@aws-sdk/client-s3/dist-cjs/S3Client.js:19:25)
      at Object.<anonymous> (../../node_modules/@aws-sdk/client-s3/dist-cjs/index.js:5:22)

When starting server there is a more detailed error:

Section: server logs

Starting server

➤ YN0000: [@vcc/car-configuration-dgs]: Debugger listening on ws://127.0.0.1:9230/d95a1d4c-b788-4097-82e7-54429d7a254c
➤ YN0000: [@vcc/car-configuration-dgs]: For help, see: https://nodejs.org/en/docs/inspector
➤ YN0000: [@vcc/car-configuration-dgs]: (node:54442) ExperimentalWarning: Custom ESM Loaders is an experimental feature and might change at any time
➤ YN0000: [@vcc/car-configuration-dgs]: (Use `node --trace-warnings ...` to show where the warning was created)
➤ YN0000: [@vcc/car-configuration-dgs]: (node:54442) ExperimentalWarning: The Node.js specifier resolution flag is experimental. It could change or be removed at any time.
➤ YN0000: [@vcc/car-configuration-dgs]: Exporting metrics using OTLP
➤ YN0000: [@vcc/car-configuration-dgs]: Metrics configured for car-configuration-dgs
➤ YN0000: [@vcc/car-configuration-dgs]: Tracing configured for car-configuration-dgs, graphql instrumentation enabled: true
➤ YN0000: [@vcc/car-configuration-dgs]: error: uncaughtException: Cannot find module '@smithy/hash-stream-node'
➤ YN0000: [@vcc/car-configuration-dgs]: Require stack:
➤ YN0000: [@vcc/car-configuration-dgs]: - /Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js
➤ YN0000: [@vcc/car-configuration-dgs]: - /Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/@aws-sdk/client-s3/dist-cjs/S3Client.js
➤ YN0000: [@vcc/car-configuration-dgs]: Error: Cannot find module '@smithy/hash-stream-node'
➤ YN0000: [@vcc/car-configuration-dgs]: Require stack:
➤ YN0000: [@vcc/car-configuration-dgs]: - /Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js
➤ YN0000: [@vcc/car-configuration-dgs]: - /Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/@aws-sdk/client-s3/dist-cjs/S3Client.js
➤ YN0000: [@vcc/car-configuration-dgs]:     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
➤ YN0000: [@vcc/car-configuration-dgs]:     at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
➤ YN0000: [@vcc/car-configuration-dgs]:     at Function.Module._load (node:internal/modules/cjs/loader:922:27)
➤ YN0000: [@vcc/car-configuration-dgs]:     at Module.require (node:internal/modules/cjs/loader:1143:19)
➤ YN0000: [@vcc/car-configuration-dgs]:     at Module.Hook._require.Module.require (/Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/require-in-the-middle/index.js:167:34)
➤ YN0000: [@vcc/car-configuration-dgs]:     at Module.Hook._require.Module.require (/Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/require-in-the-middle/index.js:167:34)
➤ YN0000: [@vcc/car-configuration-dgs]:     at require (node:internal/modules/cjs/helpers:110:18)
➤ YN0000: [@vcc/car-configuration-dgs]:     at Object.<anonymous> (/Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js:13:28)
➤ YN0000: [@vcc/car-configuration-dgs]:     at Module._compile (node:internal/modules/cjs/loader:1256:14)
➤ YN0000: [@vcc/car-configuration-dgs]:     at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) {"date":"Wed Jul 26 2023 09:32:02 GMT+0200 (Central European Summer Time)","error":{"code":"MODULE_NOT_FOUND","requireStack":["/Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js","/Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/@aws-sdk/client-s3/dist-cjs/S3Client.js"]},"exception":true,"os":{"loadavg":[4.12109375,3.73779296875,3.56494140625],"uptime":406864},"process":{"argv":["/Users/MKLIPPIN/.asdf/installs/nodejs/18.17.0/bin/node","/Users/MKLIPPIN/repos/graphql-federation-mono/dgs/car-configuration/index.ts"],"cwd":"/Users/MKLIPPIN/repos/graphql-federation-mono/dgs/car-configuration","execPath":"/Users/MKLIPPIN/.asdf/installs/nodejs/18.17.0/bin/node","gid":20,"memoryUsage":{"arrayBuffers":3033381,"external":6959940,"heapTotal":355106816,"heapUsed":324654312,"rss":493355008},"pid":54442,"uid":502,"version":"v18.17.0"},"stack":"Error: Cannot find module '@smithy/hash-stream-node'\nRequire stack:\n- /Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js\n- /Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/@aws-sdk/client-s3/dist-cjs/S3Client.js\n    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)\n    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)\n    at Function.Module._load (node:internal/modules/cjs/loader:922:27)\n    at Module.require (node:internal/modules/cjs/loader:1143:19)\n    at Module.Hook._require.Module.require (/Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/require-in-the-middle/index.js:167:34)\n    at Module.Hook._require.Module.require (/Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/require-in-the-middle/index.js:167:34)\n    at require (node:internal/modules/cjs/helpers:110:18)\n    at Object.<anonymous> (/Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js:13:28)\n    at Module._compile (node:internal/modules/cjs/loader:1256:14)\n    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)","trace":[{"column":15,"file":"node:internal/modules/cjs/loader","function":"Module._resolveFilename","line":1077,"method":"_resolveFilename","native":false},{"column":30,"file":"/Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/@cspotcode/source-map-support/source-map-support.js","function":"Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename]","line":811,"method":"installedValue [as _resolveFilename]","native":false},{"column":27,"file":"node:internal/modules/cjs/loader","function":"Module._load","line":922,"method":"_load","native":false},{"column":19,"file":"node:internal/modules/cjs/loader","function":"Module.require","line":1143,"method":"require","native":false},{"column":34,"file":"/Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/require-in-the-middle/index.js","function":"Module.require","line":167,"method":"require","native":false},{"column":34,"file":"/Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/require-in-the-middle/index.js","function":"Module.require","line":167,"method":"require","native":false},{"column":18,"file":"node:internal/modules/cjs/helpers","function":"require","line":110,"method":null,"native":false},{"column":28,"file":"/Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js","function":null,"line":13,"method":null,"native":false},{"column":14,"file":"node:internal/modules/cjs/loader","function":"Module._compile","line":1256,"method":"_compile","native":false},{"column":10,"file":"node:internal/modules/cjs/loader","function":"Module._extensions..js","line":1310,"method":".js","native":false}]}
➤ YN0000: [@vcc/car-configuration-dgs]: error: Cannot find module '@smithy/hash-stream-node'
➤ YN0000: [@vcc/car-configuration-dgs]: Require stack:
➤ YN0000: [@vcc/car-configuration-dgs]: - /Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js
➤ YN0000: [@vcc/car-configuration-dgs]: - /Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/@aws-sdk/client-s3/dist-cjs/S3Client.js {"code":"MODULE_NOT_FOUND","requireStack":["/Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js","/Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/@aws-sdk/client-s3/dist-cjs/S3Client.js"],"stack":"Error: Cannot find module '@smithy/hash-stream-node'\nRequire stack:\n- /Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js\n- /Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/@aws-sdk/client-s3/dist-cjs/S3Client.js\n    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)\n    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)\n    at Function.Module._load (node:internal/modules/cjs/loader:922:27)\n    at Module.require (node:internal/modules/cjs/loader:1143:19)\n    at Module.Hook._require.Module.require (/Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/require-in-the-middle/index.js:167:34)\n    at Module.Hook._require.Module.require (/Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/require-in-the-middle/index.js:167:34)\n    at require (node:internal/modules/cjs/helpers:110:18)\n    at Object.<anonymous> (/Users/MKLIPPIN/repos/graphql-federation-mono/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js:13:28)\n    at Module._compile (node:internal/modules/cjs/loader:1256:14)\n    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)"}

SDK version number

@aws-sdk/[email protected]

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

v18.17.0

Reproduction Steps

Nope

Observed Behavior

Nope

Expected Behavior

Nope

Possible Solution

No response

Additional Information/Context

No response

@klippx klippx added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 26, 2023
@ashwins01
Copy link

ashwins01 commented Jul 26, 2023

+1 facing the same issue! We are on node v18.14.1

Downgraded to 3.374.0, works like a charm.

@Ahmadh26
Copy link

Ahmadh26 commented Jul 26, 2023

+1 facing same issue ..

edit: i had to downgrade to version 3.360.0 for it to work..

@rlindner81
Copy link

@srchase @kuhe could you check if this is just a missing dependency declaration for @smithy/hash-stream-node here
https://github.com/aws/aws-sdk-js-v3/blame/main/clients/client-s3/package.json

@regevbr
Copy link

regevbr commented Jul 26, 2023

Seems that in #4990 you forgot to add the @smithy/hash-stream-node dependency in package.json

@kpeters-cbsi
Copy link

Adding an explicit dependency on @smithy/hash-stream-node fixed it for me

@RanVaknin
Copy link
Contributor

Hi everyone.

Thanks for letting us know.
We will look into fixing the release with priority.

All the best,
Ran~

@RanVaknin RanVaknin self-assigned this Jul 26, 2023
@RanVaknin RanVaknin added investigating Issue is being investigated and/or work is in progress to resolve the issue. p0 This issue is the highest priority and removed needs-triage This issue or PR still needs to be triaged. labels Jul 26, 2023
@kuhe kuhe added the pending-release This issue will be fixed by an approved PR that hasn't been released yet. label Jul 26, 2023
@kuhe
Copy link
Contributor

kuhe commented Jul 26, 2023

A fix was merged in #4987, adding the missing dependency. We will include this patch in the next release, which is expected to be later today.

@trivikr trivikr removed the investigating Issue is being investigated and/or work is in progress to resolve the issue. label Jul 26, 2023
@kuhe
Copy link
Contributor

kuhe commented Jul 26, 2023

v3.377.0 of @aws-sdk/client-s3 contains @smithy/hash-stream-node through a transitive dependency.

npm ls @smithy/hash-stream-node
└─┬ @aws-sdk/[email protected]
  └─┬ @aws-sdk/[email protected]
    └── @smithy/[email protected]

Is there anything specific to your application that would cause this transitive dependency to be missing?

In any case, @aws-sdk/[email protected] has been released with a direct dependency on @smithy/hash-stream-node.

@kuhe kuhe removed the pending-release This issue will be fixed by an approved PR that hasn't been released yet. label Jul 26, 2023
@rlindner81
Copy link

v3.377.0 of @aws-sdk/client-s3 contains @smithy/hash-stream-node through a transitive dependency.

npm ls @smithy/hash-stream-node
└─┬ @aws-sdk/[email protected]
  └─┬ @aws-sdk/[email protected]
    └── @smithy/[email protected]

Is there anything specific to your application that would cause this transitive dependency to be missing?

In any case, @aws-sdk/[email protected] has been released with a direct dependency on @smithy/hash-stream-node.

@kuhe Here is the relevant part of my dependency tree with no @smithy/hash-stream-node.

├─┬ @aws-sdk/[email protected]
│ ├─┬ @aws-sdk/[email protected]
│ │ ├── @aws-sdk/[email protected] deduped
│ │ ├─┬ @aws-sdk/[email protected]
│ │ │ ├─┬ @aws-sdk/[email protected]
│ │ │ │ ├─┬ @aws-sdk/[email protected]
│ │ │ │ │ └── [email protected] deduped
│ │ │ │ └── [email protected] deduped
│ │ │ └── [email protected] deduped
│ │ └── [email protected] deduped

Happy that this got turned around so quickly.

@kuhe
Copy link
Contributor

kuhe commented Jul 26, 2023

Ok, looking at your tree and back at v3.377.0, I now know what happened.

v3.377.0 released with an unintentionally wide version range for the dependency @aws-sdk/hash-stream-node, so if you had an older version in a lockfile, it would've failed to update it, causing @smithy/hash-stream-node to be missing.

As a fix for this issue, you can install v3.377.0 with a fresh lockfile, or use the patched version v3.378.0.

@kuhe kuhe added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Jul 26, 2023
@kuhe kuhe changed the title v3.377.0 release is broken v3.377.0 release is broken (@smithy/hash-stream-node is not declared as a dependency) Jul 26, 2023
@github-actions github-actions bot added closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jul 31, 2023
@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 Aug 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug. closed-for-staleness p0 This issue is the highest priority
Projects
None yet
Development

No branches or pull requests

9 participants