m-radzikowski / aws-sdk-client-mock

AWS JavaScript SDK v3 mocks for easy unit testing. 🖋️ Typed 🔬 Tested 📄 Documented 🛠️ Maintained
https://m-radzikowski.github.io/aws-sdk-client-mock/
MIT License
790 stars 38 forks source link

AwsStub issues #208

Closed paul-uz closed 6 months ago

paul-uz commented 8 months ago

Checklist

Bug description

Using the latest AWS SDK packages (3.496.0) and latest mock version (3.0.1) I am seeing this error:

Type 'AwsStub<ServiceInputTypes, ServiceOutputTypes, DynamoDBClientResolvedConfig>' is missing the following properties from type 'DynamoDBClient': config, destroy, getDefaultHttpAuthSchemeParametersProvider, getIdentityProviderConfigProvider, middlewareStackts(2739)

I checked the smithy types, and I have mostly 2.9.1 but one AWS package, node-http-handler, uses 1.2.0. I installed the types as a dev dependency, but that didn't help.

Reproduction

Environment

EDIT - updated AWs package list

paul-uz commented 8 months ago

So @aws-sdk/node-http-handler is deprecated, moving to @smithy/node-http-handler so I fixed that, now all smithy types are 2.9.1. But I still have the AwsStub error.

Updated TS to v5.3.3, still no dice.

m-radzikowski commented 6 months ago

Hey. Creating a fresh project with provided dependencies does not give me any type errors. After changing versions from ^3.496.0 to 3.496.0 to install exactly those packages also no errors.

Please try installing the latest AWS SDK packages and following steps described in #197. You can also try removing package-lock.json to resolve fresh versions of all dependencies. If nothing helps, please create a new repository with problem reproduction and reopen this issue.

paul-uz commented 6 months ago

I'll have to recheck as we recently moved to node20 and updated pretty much everything