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

S3 Client Module Resolution Issue #6815

Closed
3 of 4 tasks
CHC383 opened this issue Jan 16, 2025 · 2 comments
Closed
3 of 4 tasks

S3 Client Module Resolution Issue #6815

CHC383 opened this issue Jan 16, 2025 · 2 comments
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@CHC383
Copy link

CHC383 commented Jan 16, 2025

Checkboxes for prior research

Describe the bug

I am using TypeScript and try to import from @aws-sdk/client-s3 in my Vitest tests. While trying to run the test, I got the error

Cannot find module '/Users/xxx/workspace/xxx/node_modules/.pnpm/@[email protected]/node_modules/@aws-sdk/core/dist-es/submodules/client/index' imported from /Users/xxx/workspace/xxx/node_modules/.pnpm/@[email protected]/node_modules/@aws-sdk/core/dist-es/index.js.

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

v22.13.0

Reproduction Steps

import { PutObjectCommand, S3Client } from "@aws-sdk/client-s3";

Observed Behavior

Error: Cannot find module '/Users/xxx/workspace/xxx/node_modules/.pnpm/@[email protected]/node_modules/@aws-sdk/core/dist-es/submodules/client/index' imported from /Users/xxx/workspace/xxx/node_modules/.pnpm/@[email protected]/node_modules/@aws-sdk/core/dist-es/index.js

Expected Behavior

Successfully import the classes

Possible Solution

No response

Additional Information/Context

Typescript: v5.7.3
Vite: v3.0.0
Vitest: v6.0.7
pnpm: v10.0.0

// tsconfig.json
"module": "esnext",
"moduleResolution": "bundler",
// package.json
"type": "module",
@CHC383 CHC383 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 16, 2025
@CHC383
Copy link
Author

CHC383 commented Jan 16, 2025

Looks like a module resolution issue on Vitest side
vitest-dev/vitest#7269

@CHC383 CHC383 closed this as completed Jan 16, 2025
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant