-
Notifications
You must be signed in to change notification settings - Fork 598
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
util-user-agent-node and signature-v4-multi-region fails with ESM #4373
Comments
Hi @ciscoheat , Thanks for opening this issue. Since you are using a 3rd party tool, and we don't have repro steps this will make it hard to root cause.
This being a sudden change is worrisome, this might be a breaking change from the SDK side. Thank you, |
Hello Ran, it is difficult to reproduce. By just adding the @AWS-SDK library to an empty project gives no problem. And the build works without error with SvelteKit, but when testing it with Vitest, the error occurs, even though they are using the same configuration (both are built on Vite). I'm not importing any of the mentioned libraries, this is my only reference, in a single file: import { S3Client, PutObjectCommand, DeleteObjectCommand } from '@aws-sdk/client-s3'; And to make things more confusing, there is no reference to this file in the tests. |
I am getting the same error on @aws-sdk/client-s3 v3.267.0 If you would like to investigate the commit is here. It only popped up when I imported from @aws-sdk/client-s3 in the file under test. |
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. |
Checkboxes for prior research
Describe the bug
In version 3.257.0 I suddenly get an ESM-related error when using vitest with a SvelteKit site. By configuring vite to inline the packages, it works again.
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.10.0
Reproduction Steps
Sorry but I cannot reproduce this in an easy way. I'm hoping that the error is well-known and has an easy fix.
Observed Behavior
Expected Behavior
No error message, it used to work fine.
Possible Solution
No response
Additional Information/Context
The suggested workaround works, when adding this to
vite.config.js
The text was updated successfully, but these errors were encountered: