Closed jy852095639 closed 3 days ago
Hi @jy852095639 - thanks for reaching out.
Can you share your SDK code example that would give us more insight into the issue you're facing? Also it seems like you're using JavaScript SDK v2. If confirmed, I'll transfer this to our v2 repo.
Best, John
import AWS from 'aws-sdk' AWS.config.update({ accessKeyId: myAccessKeyId, secretAccessKey: mySecretAccessKey, region: myRegion }) const s3 = new AWS.S3() return s3.getSignedUrl('getObject', { Bucket: bucket, Key: url })
@jy852095639 in vite.config.ts, add this config maybe solve this problem
export default defineConfig({ build: { commonjsOptions: { strictRequires: true, } } })
@jy852095639 - appreciate for sharing the code. I don't see anything abnormal with the code.
Can you try updating Vite.config mentioned by @Tookfreshman (thanks for chiming in)?
This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing.
Describe the issue
vite 5.0.11
aws-sdk 2.1619.0
code: import AWS from 'aws-sdk' console.log(AWS) When I introduce and use AWS, I will report an error
Links
NO