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

Cannot find module '@smithy/abort-controller' in @aws-sdk/lib-storage@3.367.0 #4942

Closed
3 tasks done
WhiteKiwi opened this issue Jul 10, 2023 · 5 comments · Fixed by #4953
Closed
3 tasks done

Cannot find module '@smithy/abort-controller' in @aws-sdk/lib-storage@3.367.0 #4942

WhiteKiwi opened this issue Jul 10, 2023 · 5 comments · Fixed by #4953
Assignees
Labels
bug This issue is a bug. investigating Issue is being investigated and/or work is in progress to resolve the issue. p3 This is a minor priority issue

Comments

@WhiteKiwi
Copy link
Contributor

Checkboxes for prior research

Describe the bug

    Cannot find module '@smithy/abort-controller' from '../../node_modules/.pnpm/@aws-sdk+lib-storage@3.367.0_@aws-sdk+client-s3@3.367.0/node_modules/@aws-sdk/lib-storage/dist-cjs/Upload.js'

image

SDK version number

@aws-sdk/lib-storage@3.367.0

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

v18.16.0

Reproduction Steps

Install and import '@aws-sdk/lib-storage@3.367.0'

Observed Behavior

Cannot find module '@smithy/abort-controller'

Expected Behavior

Find module '@smithy/abort-controller'

Possible Solution

Add '@smithy/abort-controller' in 'devDependencies' to the 'dependencies'

Additional Information/Context

No response

@WhiteKiwi WhiteKiwi added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 10, 2023
@yenfryherrerafeliz yenfryherrerafeliz self-assigned this Jul 10, 2023
@yenfryherrerafeliz
Copy link
Contributor

Hi @WhiteKiwi, sorry to hear about your issues. "@smithy/abort-controller" is indeed a dev dependency of @aws-sdk/lib-storage, which can be confirmed here. I am also not able to reproduce this issue on my end. Can you please make sure your dependencies are up to date?, could you please maybe try deleting the package-lock.json file?, and see if that fixes the problem.

Thanks!

@yenfryherrerafeliz yenfryherrerafeliz added response-requested Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days. p3 This is a minor priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Jul 10, 2023
@WhiteKiwi
Copy link
Contributor Author

WhiteKiwi commented Jul 11, 2023

Hi!
I have confirmed that this issue is occurring only in pnpm.

First, devDependencies is not a dependency that is installed after the library is deployed.
For '@aws-sdk/lib-storage', it can be used as a phantom dependency at npm because it relies on '@smithy/abort-controller' in its sub-packages.
However, pnpm does not allow phantom dependencies, so only the dependencies specified in package.json's dependencies are accessible in the package.

You can reproduce it in the repo below.
https://github.com/WhiteKiwi/issues/tree/aws-sdk-js-v3/4942

I am not good at English. If there's anything you don't understand, please comment.
Thank you for reading it.

@yenfryherrerafeliz yenfryherrerafeliz added investigating Issue is being investigated and/or work is in progress to resolve the issue. and removed response-requested Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days. labels Jul 11, 2023
@yenfryherrerafeliz
Copy link
Contributor

@WhiteKiwi thanks for this information. Your English is perfect, so do not worry. I will investigate this further and I will get back to you as soon as possible.

Thanks!

@saehun
Copy link

saehun commented Jul 11, 2023

I've got same issue +1

@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 Jul 26, 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. investigating Issue is being investigated and/or work is in progress to resolve the issue. p3 This is a minor priority issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants