-
Notifications
You must be signed in to change notification settings - Fork 634
Closed
Labels
bugThis issue is a bug.This issue is a bug.p2This is a standard priority issueThis is a standard priority issuepotential-regressionMarking this issue as a potential regression to be checked by team memberMarking this issue as a potential regression to be checked by team member
Description
Checkboxes for prior research
- I've gone through Developer Guide and API reference
- I've checked AWS Forums and StackOverflow.
- I've searched for previous similar issues and didn't find any solution.
Describe the bug
Updating a project with @aws-sdk/client-s3
, @aws-sdk/s3-request-presigner
, & @aws-sdk/util-create-request
from 3.723.0
to 3.726.0
or 3.726.1
generates TS2345 & TS2308 errors upon running tsc
.
Regression Issue
- Select this option if this issue appears to be a regression.
SDK version number
@aws-sdk/[email protected], @aws-sdk/[email protected]
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v20.17.0
Reproduction Steps
- Using latest S3 from
[email protected]
(or 3.726.1) and latestcreateRequest
from@aws-sdk/[email protected]
similar to:
import { DeleteObjectsOutput, GetObjectCommand, GetObjectOutput, PutObjectOutput, S3, S3ClientConfig } from '@aws-sdk/client-s3';
import { createRequest } from '@aws-sdk/util-create-request';
const s3Client = new S3({
credentials: {
accessKeyId: accessTokenResponse.key,
secretAccessKey: accessTokenResponse.secret,
},
region: environment.ContentBucketRegion,
});
await createRequest(
s3Client, // TS2345: Argument of type S3 is not assignable to parameter of type Client<any, ServiceInputTypes, MetadataBearer, any> Types have separate declarations of a private property handler
new GetObjectCommand({
Bucket: environment.ContentBucketName,
Key: FileStorageService.getS3ObjectKey(payload),
}),
)
Observed Behavior
tsc
generates:
error TS2345: Argument of type 'S3' is not assignable to parameter of type 'Client<any, ServiceInputTypes, MetadataBearer, any>'.
Types have separate declarations of a private property 'handlers'.
node_modules/@aws-sdk/s3-request-presigner/node_modules/@smithy/core/protocols.d.ts(6,3): error TS2308: Module "@smithy/core/dist-types/submodules/protocols/index.d" has already exported a member named 'RequestBuilder'. Consider explicitly re-exporting to resolve the ambiguity.
node_modules/@aws-sdk/s3-request-presigner/node_modules/@smithy/core/protocols.d.ts(6,3): error TS2308: Module "@smithy/core/dist-types/submodules/protocols/index.d" has already exported a member named 'collectBody'. Consider explicitly re-exporting to resolve the ambiguity.
node_modules/@aws-sdk/s3-request-presigner/node_modules/@smithy/core/protocols.d.ts(6,3): error TS2308: Module "@smithy/core/dist-types/submodules/protocols/index.d" has already exported a member named 'extendedEncodeURIComponent'. Consider explicitly re-exporting to resolve the ambiguity.
node_modules/@aws-sdk/s3-request-presigner/node_modules/@smithy/core/protocols.d.ts(6,3): error TS2308: Module "@smithy/core/dist-types/submodules/protocols/index.d" has already exported a member named 'requestBuilder'. Consider explicitly re-exporting to resolve the ambiguity.
node_modules/@aws-sdk/s3-request-presigner/node_modules/@smithy/core/protocols.d.ts(6,3): error TS2308: Module "@smithy/core/dist-types/submodules/protocols/index.d" has already exported a member named 'resolvedPath'. Consider explicitly re-exporting to resolve the ambiguity.
Expected Behavior
Minor version update would not introduce incompatible types.
Possible Solution
No response
Additional Information/Context
No response
kotarou1192 and Sheldenshi
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.p2This is a standard priority issueThis is a standard priority issuepotential-regressionMarking this issue as a potential regression to be checked by team memberMarking this issue as a potential regression to be checked by team member