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

Importing @aws-sdk/client-glacier throws "Error: Cannot find module '@aws-sdk/body-checksum-node'" #849

Closed
trivikr opened this issue Feb 4, 2020 · 6 comments
Labels
bug This issue is a bug.

Comments

@trivikr
Copy link
Member

trivikr commented Feb 4, 2020

Describe the bug
Importing @aws-sdk/client-glacier throws "Error: Cannot find module '@aws-sdk/body-checksum-node'"

SDK version number

$ yarn list @aws-sdk/client-glacier
└─ @aws-sdk/[email protected]

Is the issue in the browser/Node.js?
Node.js

Details of the browser/Node.js version
v10.18.0

To Reproduce (observed behavior)

$ yarn add @aws-sdk/client-glacier@alpha
$ node
> const { Glacier } = require("@aws-sdk/client-glacier");
Thrown:
{ Error: Cannot find module '@aws-sdk/body-checksum-node'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18) code: 'MODULE_NOT_FOUND' }

Expected behavior
The import should not throw any error

@trivikr trivikr added the bug This issue is a bug. label Feb 4, 2020
@srchase
Copy link
Contributor

srchase commented Feb 4, 2020

The generated Glacier client includes these two lines in the package.json:

    "@aws-sdk/body-checksum-browser": "^1.0.0-alpha.0",
    "@aws-sdk/body-checksum-node": "^1.0.0-alpha.0",

Those dependencies are missing here: https://github.com/aws/aws-sdk-js-v3/blob/smithy-codegen/clients/client-glacier/package.json

@srchase
Copy link
Contributor

srchase commented Feb 4, 2020

May be same issue as #804

@trivikr
Copy link
Member Author

trivikr commented Feb 4, 2020

The dependencies were not manually added in clients/client-glacier/GlacierClient.ts in PR #789

The dependencies were not added by CodeGen because of issue discussed in #804

@trivikr
Copy link
Member Author

trivikr commented Feb 4, 2020

The release script caught missing dependencies in body-checksum-* packages (fixed in #839), but not in client-glacier

@trivikr
Copy link
Member Author

trivikr commented Feb 5, 2020

Verified that the issue is resolved in @aws-sdk/[email protected]

@trivikr trivikr closed this as completed Feb 5, 2020
@lock
Copy link

lock bot commented Feb 12, 2020

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.

@lock lock bot locked as resolved and limited conversation to collaborators Feb 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants