Closed danielsitnik closed 1 year ago
Thanks for opening your first issue here! We'll come back to you as soon as we can. In the meantime, check out the #typescript channel on our Powertools for AWS Lambda Discord: Invite link
Hi @danielsitnik, thanks for taking the time to open this issue.
Based on the screenshot you have shared the type error appears to be coming from a file called dependency-container.d.ts
at line 31, column 5. The project doesn't have any file with that name and you can verify this by searching the repo.
To try to isolate the issue, I have also tried to reproduce the error you describe using the versions you listed but was not able to. You haven't specified the version of Powertools Tracer you're using, so I have assumed the latest (1.14.0
).
I have also created a sample repository with my setup, which you can find here: https://github.com/dreamorosi/repro-1763
After cloning that repository, please run npm ci
to install the dependencies and then npm run build
to compile it. In my case I was able to do so without error. Likewise, the IDE doesn't show any error.
If you can, please try to clone the repo I have shared and see if you see the error in that one as well.
Ohhh my bad!
I didn't notice it was coming from dependency-container.d.ts
, this is from tsyringe.
I have been using it with the AWS SDKs for over a year without any problems. I guess the latest versions of the SDK changed something in the clients constructor that is causing this incompatibility now. 😞
Sorry, I'll take this issue over to the tsyringe team.
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Expected Behaviour
When using Tracer, I expect to be able to use the
captureAWSv3Client
function with any of the official SDKs.Current Behaviour
When trying to use
captureAWSv3Client
withGlueClient
(or any other client), TypeScript complains with the following error:I'm using TypeScript version
4.9.5
. Tested on DynamoDBClient and GlueClient, both at version3.431.0
Code snippet
Steps to Reproduce
Just use the provided code snippet.
Possible Solution
No response
Powertools for AWS Lambda (TypeScript) version
latest
AWS Lambda function runtime
16.x
Packaging format used
npm
Execution logs
No response