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

Typescript compile error on latest library release (3.703.0) #6706

Closed
3 of 4 tasks
jpike88 opened this issue Dec 2, 2024 · 3 comments
Closed
3 of 4 tasks

Typescript compile error on latest library release (3.703.0) #6706

jpike88 opened this issue Dec 2, 2024 · 3 comments
Assignees
Labels
bug This issue is a bug. p2 This is a standard priority issue response-requested Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.

Comments

@jpike88
Copy link

jpike88 commented Dec 2, 2024

Checkboxes for prior research

Describe the bug

Screenshot 2024-12-02 at 11 50 08 AM

Just updated to latest version:

This error happens now.

Just to be clear I aliased getSignedUrl, just to give some context:
import { S3 } from '@aws-sdk/client-s3';
import { getSignedUrl as getS3SignedUrl } from '@aws-sdk/s3-request-presigner';

see error below

Screenshot 2024-12-02 at 11 43 44 AM

Regression Issue

  • Select this option if this issue appears to be a regression.

SDK version number

3.703.0

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

23.1.0

Reproduction Steps

try to build with typescript.

Observed Behavior

typescript error

Expected Behavior

no typescript error

Possible Solution

No response

Additional Information/Context

No response

@jpike88 jpike88 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 2, 2024
@jpike88 jpike88 changed the title Typescript compile error on latest library release Typescript compile error on latest library release (3.703.0) Dec 2, 2024
@jpike88 jpike88 changed the title Typescript compile error on latest library release (3.703.0) Typescript compile error on latest library release (breaking between 3.701.0 and 3.703.0) Dec 2, 2024
@jpike88 jpike88 changed the title Typescript compile error on latest library release (breaking between 3.701.0 and 3.703.0) Typescript compile error on latest library release (edit: it's breaking between 3.701.0 and 3.703.0) Dec 2, 2024
@jpike88 jpike88 changed the title Typescript compile error on latest library release (edit: it's breaking between 3.701.0 and 3.703.0) Typescript compile error on latest library release (3.703.0) Dec 2, 2024
@jpike88
Copy link
Author

jpike88 commented Dec 4, 2024

@trivikr I see new versions coming out, any change you're going to fix this type error? It's a common usage by S3 + request presigning, I bet this is going to become a big problem experience by many other devs soon.

@zshzbh zshzbh self-assigned this Dec 4, 2024
@zshzbh zshzbh added the p2 This is a standard priority issue label Dec 4, 2024
@zshzbh
Copy link
Contributor

zshzbh commented Dec 4, 2024

Could you please provide your minimal code reproduction?

I don't see any issues on my end.
The package version I use -

    "@aws-sdk/client-s3": "^3.705.0",
    "@aws-sdk/s3-request-presigner": "^3.705.0",

The code I have -

import { GetObjectAclCommand, S3Client } from "@aws-sdk/client-s3";
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";

const s3Client = new S3Client({ region: "us-east-1" });
const command = new GetObjectAclCommand({
  Bucket: "new-bucket-maggie-ma",
  Key: "0.txt",
  //expiration: "4000"
});

const presigned = await getSignedUrl(s3Client, command, {
  expiresIn: "3000",
  // Set of all x-amz-* headers you wish to have signed
//  unhoistableHeaders: new Set(["x-amz-checksum-sha256"]),
});
console.log(presigned)	

I think the error is because it accepts s3Client type instead of s3 type
Could you please provide your minimal code reproduction? I can troubleshoot once we know how you setup s3 client

@zshzbh zshzbh added the response-requested Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days. label Dec 4, 2024
@jpike88
Copy link
Author

jpike88 commented Dec 4, 2024

turns out it was dependency version mismatch, removing package lock and node modules, reinstalling and no problems. thanks

@jpike88 jpike88 closed this as completed Dec 4, 2024
@zshzbh zshzbh removed the needs-triage This issue or PR still needs to be triaged. label Dec 4, 2024
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. p2 This is a standard priority issue response-requested Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants