Typescript compilation problems since 3.52.0 in lib-dynamodb
See original GitHub issueDescribe the bug
Since lib-dynamodb version 3.52.0 tsc can’t compile the library without compilation issues.
Your environment
SDK version number
@aws-sdk/lib-dynamodb@3.52.0
Is the issue in the browser/Node.js/ReactNative?
Node.js
Details of the browser/Node.js/ReactNative version
v16.7.0
Steps to reproduce
Any code using lib-dynamodb causing tsc to compile the library.
Observed behavior
tsc fails with the following errors
$ tsc -p .\tsconfig.json --noEmit
node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/BatchExecuteStatementCommand.d.ts:33:5 - error TS2416: Property 'resolveMiddleware' in type 'BatchExecuteStatementCommand' is not assignable to the same property in base type 'Command<BatchExecuteStatementCommandInput, BatchExecuteStatementCommandOutput, Dynam
oDBDocumentClientResolvedConfig, any, any>'.
Type '(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: HttpHandlerOptions | undefined) => Handler<...>' is not assignable to type '(stack: MiddlewareStack<any, any>, configuration: DynamoDBDocumentClientResolvedConfig, options: a
ny) => Handler<BatchExecuteStatementCommandInput, BatchExecuteStatementCommandOutput>'.
Types of parameters 'clientStack' and 'stack' are incompatible.
Type 'MiddlewareStack<any, any>' is not assignable to type 'MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>'.
33 resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: __HttpHandlerOptions): Handler<BatchExecuteStatementCommandInput, BatchExecuteStatementCommandOutput>;
~~~~~~~~~~~~~~~~~
node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/BatchGetCommand.d.ts:44:5 - error TS2416: Property 'resolveMiddleware' in type 'BatchGetCommand' is not assignable to the same property in base type 'Command<BatchGetCommandInput, BatchGetCommandOutput, DynamoDBDocumentClientResolvedConfig, any, any>'.
Type '(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: HttpHandlerOptions | undefined) => Handler<...>' is not assignable to type '(stack: MiddlewareStack<any, any>, configuration: DynamoDBDocumentClientResolvedConfig, options: a
ny) => Handler<BatchGetCommandInput, BatchGetCommandOutput>'.
Types of parameters 'clientStack' and 'stack' are incompatible.
Type 'MiddlewareStack<any, any>' is not assignable to type 'MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>'.
Types of property 'concat' are incompatible.
Type '<InputType extends any, OutputType extends any>(from: MiddlewareStack<InputType, OutputType>) => MiddlewareStack<InputType, OutputType>' is not assignable to type '<InputType extends ServiceInputTypes, OutputType extends ServiceOutputTypes>(from: MiddlewareStack<InputType, OutputType>) => Middlewar
eStack<...>'.
Types of parameters 'from' and 'from' are incompatible.
Type 'MiddlewareStack<InputType, OutputType>' is not assignable to type 'MiddlewareStack<InputType, OutputType | undefined>'.
Types of property 'concat' are incompatible.
Type '<InputType extends InputType, OutputType extends OutputType>(from: MiddlewareStack<InputType, OutputType>) => MiddlewareStack<InputType, OutputType>' is not assignable to type '<InputType extends InputType, OutputType extends OutputType | undefined>(from: MiddlewareStack<InputType, OutputTy
pe>) => MiddlewareStack<InputType, OutputType>'.
Types of parameters 'from' and 'from' are incompatible.
Type 'import("C:/Users/zackp/Source/moonpig/moonpig-memberships-api/node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/types/dist-types/middleware").MiddlewareStack<InputType, OutputType>' is not assignable to type 'import("C:/Users/zackp/Source/moonpig/moonpig-memberships-api/node_module
s/@aws-sdk/types/dist-types/middleware").MiddlewareStack<InputType, OutputType>'.
Types of property 'add' are incompatible.
Type '{ (middleware: import("C:/Users/zackp/Source/moonpig/moonpig-memberships-api/node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/types/dist-types/middleware").InitializeMiddleware<InputType, OutputType>, options?: (import("C:/Users/zackp/Source/moonpig/moonpig-memberships-api/nod
e_modules/@aws-sdk/client-ssm/node...' is not assignable to type '{ (middleware: import("C:/Users/zackp/Source/moonpig/moonpig-memberships-api/node_modules/@aws-sdk/types/dist-types/middleware").InitializeMiddleware<InputType, OutputType>, options?: (import("C:/Users/zackp/Source/moonpig/moonpig-memberships-api/no
de_modules/@aws-sdk/types/dist-types/middleware").InitializeHandlerO...'.
Types of parameters 'middleware' and 'middleware' are incompatible.
Types of parameters 'next' and 'next' are incompatible.
Type 'import("C:/Users/zackp/Source/moonpig/moonpig-memberships-api/node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/types/dist-types/middleware").InitializeHandler<InputType, OutputType>' is not assignable to type 'import("C:/Users/zackp/Source/moonpig/moonpig-memberships-api
/node_modules/@aws-sdk/types/dist-types/middleware").InitializeHandler<InputType, OutputType>'.
Type 'Promise<import("C:/Users/zackp/Source/moonpig/moonpig-memberships-api/node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/types/dist-types/middleware").InitializeHandlerOutput<OutputType>>' is not assignable to type 'Promise<import("C:/Users/zackp/Source/moonpig/moonpig-m
emberships-api/node_modules/@aws-sdk/types/dist-types/middleware").InitializeHandlerOutput<OutputType>>'.
Type 'import("C:/Users/zackp/Source/moonpig/moonpig-memberships-api/node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/types/dist-types/middleware").InitializeHandlerOutput<OutputType>' is not assignable to type 'import("C:/Users/zackp/Source/moonpig/moonpig-memberships-api/
node_modules/@aws-sdk/types/dist-types/middleware").InitializeHandlerOutput<OutputType>'.
Types of property 'output' are incompatible.
Type 'OutputType' is not assignable to type 'OutputType'. Two different types with this name exist, but they are unrelated.
'OutputType' could be instantiated with an arbitrary type which could be unrelated to 'OutputType'.
44 resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: __HttpHandlerOptions): Handler<BatchGetCommandInput, BatchGetCommandOutput>;
~~~~~~~~~~~~~~~~~
node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/BatchWriteCommand.d.ts:60:5 - error TS2416: Property 'resolveMiddleware' in type 'BatchWriteCommand' is not assignable to the same property in base type 'Command<BatchWriteCommandInput, BatchWriteCommandOutput, DynamoDBDocumentClientResolvedConfig, any, any>'.
Type '(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: HttpHandlerOptions | undefined) => Handler<...>' is not assignable to type '(stack: MiddlewareStack<any, any>, configuration: DynamoDBDocumentClientResolvedConfig, options: a
ny) => Handler<BatchWriteCommandInput, BatchWriteCommandOutput>'.
Types of parameters 'clientStack' and 'stack' are incompatible.
Type 'MiddlewareStack<any, any>' is not assignable to type 'MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>'.
60 resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: __HttpHandlerOptions): Handler<BatchWriteCommandInput, BatchWriteCommandOutput>;
~~~~~~~~~~~~~~~~~
node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/DeleteCommand.d.ts:45:5 - error TS2416: Property 'resolveMiddleware' in type 'DeleteCommand' is not assignable to the same property in base type 'Command<DeleteCommandInput, DeleteCommandOutput, DynamoDBDocumentClientResolvedConfig, any, any>'.
Type '(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: HttpHandlerOptions | undefined) => Handler<...>' is not assignable to type '(stack: MiddlewareStack<any, any>, configuration: DynamoDBDocumentClientResolvedConfig, options: a
ny) => Handler<DeleteCommandInput, DeleteCommandOutput>'.
Types of parameters 'clientStack' and 'stack' are incompatible.
Type 'MiddlewareStack<any, any>' is not assignable to type 'MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>'.
45 resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: __HttpHandlerOptions): Handler<DeleteCommandInput, DeleteCommandOutput>;
~~~~~~~~~~~~~~~~~
node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/ExecuteStatementCommand.d.ts:29:5 - error TS2416: Property 'resolveMiddleware' in type 'ExecuteStatementCommand' is not assignable to the same property in base type 'Command<ExecuteStatementCommandInput, ExecuteStatementCommandOutput, DynamoDBDocumentClientRes
olvedConfig, any, any>'.
Type '(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: HttpHandlerOptions | undefined) => Handler<...>' is not assignable to type '(stack: MiddlewareStack<any, any>, configuration: DynamoDBDocumentClientResolvedConfig, options: a
ny) => Handler<ExecuteStatementCommandInput, ExecuteStatementCommandOutput>'.
Types of parameters 'clientStack' and 'stack' are incompatible.
Type 'MiddlewareStack<any, any>' is not assignable to type 'MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>'.
29 resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: __HttpHandlerOptions): Handler<ExecuteStatementCommandInput, ExecuteStatementCommandOutput>;
~~~~~~~~~~~~~~~~~
node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/ExecuteTransactionCommand.d.ts:33:5 - error TS2416: Property 'resolveMiddleware' in type 'ExecuteTransactionCommand' is not assignable to the same property in base type 'Command<ExecuteTransactionCommandInput, ExecuteTransactionCommandOutput, DynamoDBDocumentC
lientResolvedConfig, any, any>'.
Type '(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: HttpHandlerOptions | undefined) => Handler<...>' is not assignable to type '(stack: MiddlewareStack<any, any>, configuration: DynamoDBDocumentClientResolvedConfig, options: a
ny) => Handler<ExecuteTransactionCommandInput, ExecuteTransactionCommandOutput>'.
Types of parameters 'clientStack' and 'stack' are incompatible.
Type 'MiddlewareStack<any, any>' is not assignable to type 'MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>'.
33 resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: __HttpHandlerOptions): Handler<ExecuteTransactionCommandInput, ExecuteTransactionCommandOutput>;
~~~~~~~~~~~~~~~~~
node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/GetCommand.d.ts:31:5 - error TS2416: Property 'resolveMiddleware' in type 'GetCommand' is not assignable to the same property in base type 'Command<GetCommandInput, GetCommandOutput, DynamoDBDocumentClientResolvedConfig, any, any>'.
Type '(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: HttpHandlerOptions | undefined) => Handler<...>' is not assignable to type '(stack: MiddlewareStack<any, any>, configuration: DynamoDBDocumentClientResolvedConfig, options: a
ny) => Handler<GetCommandInput, GetCommandOutput>'.
Types of parameters 'clientStack' and 'stack' are incompatible.
Type 'MiddlewareStack<any, any>' is not assignable to type 'MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>'.
31 resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetCommandInput, GetCommandOutput>;
~~~~~~~~~~~~~~~~~
node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/PutCommand.d.ts:45:5 - error TS2416: Property 'resolveMiddleware' in type 'PutCommand' is not assignable to the same property in base type 'Command<PutCommandInput, PutCommandOutput, DynamoDBDocumentClientResolvedConfig, any, any>'.
Type '(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: HttpHandlerOptions | undefined) => Handler<...>' is not assignable to type '(stack: MiddlewareStack<any, any>, configuration: DynamoDBDocumentClientResolvedConfig, options: a
ny) => Handler<PutCommandInput, PutCommandOutput>'.
Types of parameters 'clientStack' and 'stack' are incompatible.
Type 'MiddlewareStack<any, any>' is not assignable to type 'MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>'.
45 resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: __HttpHandlerOptions): Handler<PutCommandInput, PutCommandOutput>;
~~~~~~~~~~~~~~~~~
node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/QueryCommand.d.ts:47:5 - error TS2416: Property 'resolveMiddleware' in type 'QueryCommand' is not assignable to the same property in base type 'Command<QueryCommandInput, QueryCommandOutput, DynamoDBDocumentClientResolvedConfig, any, any>'.
Type '(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: HttpHandlerOptions | undefined) => Handler<...>' is not assignable to type '(stack: MiddlewareStack<any, any>, configuration: DynamoDBDocumentClientResolvedConfig, options: a
ny) => Handler<QueryCommandInput, QueryCommandOutput>'.
Types of parameters 'clientStack' and 'stack' are incompatible.
Type 'MiddlewareStack<any, any>' is not assignable to type 'MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>'.
47 resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: __HttpHandlerOptions): Handler<QueryCommandInput, QueryCommandOutput>;
~~~~~~~~~~~~~~~~~
node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/ScanCommand.d.ts:42:5 - error TS2416: Property 'resolveMiddleware' in type 'ScanCommand' is not assignable to the same property in base type 'Command<ScanCommandInput, ScanCommandOutput, DynamoDBDocumentClientResolvedConfig, any, any>'.
Type '(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: HttpHandlerOptions | undefined) => Handler<...>' is not assignable to type '(stack: MiddlewareStack<any, any>, configuration: DynamoDBDocumentClientResolvedConfig, options: a
ny) => Handler<ScanCommandInput, ScanCommandOutput>'.
Types of parameters 'clientStack' and 'stack' are incompatible.
Type 'MiddlewareStack<any, any>' is not assignable to type 'MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>'.
42 resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: __HttpHandlerOptions): Handler<ScanCommandInput, ScanCommandOutput>;
~~~~~~~~~~~~~~~~~
node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/TransactGetCommand.d.ts:37:5 - error TS2416: Property 'resolveMiddleware' in type 'TransactGetCommand' is not assignable to the same property in base type 'Command<TransactGetCommandInput, TransactGetCommandOutput, DynamoDBDocumentClientResolvedConfig, any, an
y>'.
Type '(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: HttpHandlerOptions | undefined) => Handler<...>' is not assignable to type '(stack: MiddlewareStack<any, any>, configuration: DynamoDBDocumentClientResolvedConfig, options: a
ny) => Handler<TransactGetCommandInput, TransactGetCommandOutput>'.
Types of parameters 'clientStack' and 'stack' are incompatible.
Type 'MiddlewareStack<any, any>' is not assignable to type 'MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>'.
37 resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: __HttpHandlerOptions): Handler<TransactGetCommandInput, TransactGetCommandOutput>;
~~~~~~~~~~~~~~~~~
node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/TransactWriteCommand.d.ts:66:5 - error TS2416: Property 'resolveMiddleware' in type 'TransactWriteCommand' is not assignable to the same property in base type 'Command<TransactWriteCommandInput, TransactWriteCommandOutput, DynamoDBDocumentClientResolvedConfig,
any, any>'.
Type '(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: HttpHandlerOptions | undefined) => Handler<...>' is not assignable to type '(stack: MiddlewareStack<any, any>, configuration: DynamoDBDocumentClientResolvedConfig, options: a
ny) => Handler<TransactWriteCommandInput, TransactWriteCommandOutput>'.
Types of parameters 'clientStack' and 'stack' are incompatible.
Type 'MiddlewareStack<any, any>' is not assignable to type 'MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>'.
66 resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: __HttpHandlerOptions): Handler<TransactWriteCommandInput, TransactWriteCommandOutput>;
~~~~~~~~~~~~~~~~~
node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/UpdateCommand.d.ts:50:5 - error TS2416: Property 'resolveMiddleware' in type 'UpdateCommand' is not assignable to the same property in base type 'Command<UpdateCommandInput, UpdateCommandOutput, DynamoDBDocumentClientResolvedConfig, any, any>'.
Type '(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: HttpHandlerOptions | undefined) => Handler<...>' is not assignable to type '(stack: MiddlewareStack<any, any>, configuration: DynamoDBDocumentClientResolvedConfig, options: a
ny) => Handler<UpdateCommandInput, UpdateCommandOutput>'.
Types of parameters 'clientStack' and 'stack' are incompatible.
Type 'MiddlewareStack<any, any>' is not assignable to type 'MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>'.
50 resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: DynamoDBDocumentClientResolvedConfig, options?: __HttpHandlerOptions): Handler<UpdateCommandInput, UpdateCommandOutput>;
~~~~~~~~~~~~~~~~~
node_modules/@aws-sdk/lib-dynamodb/dist-types/pagination/Interfaces.d.ts:4:18 - error TS2430: Interface 'DynamoDBDocumentPaginationConfiguration' incorrectly extends interface 'PaginationConfiguration'.
Types of property 'client' are incompatible.
Type 'DynamoDBDocumentClient | DynamoDBDocument' is not assignable to type 'Client<any, any, any>'.
Type 'DynamoDBDocumentClient' is not assignable to type 'Client<any, any, any>'.
The types of 'middlewareStack.concat' are incompatible between these types.
Type '<InputType extends ServiceInputTypes, OutputType extends ServiceOutputTypes>(from: MiddlewareStack<InputType, OutputType>) => MiddlewareStack<...>' is not assignable to type '<InputType extends any, OutputType extends any>(from: MiddlewareStack<InputType, OutputType>) => MiddlewareStack<InputType,
OutputType>'.
Types of parameters 'from' and 'from' are incompatible.
Type 'MiddlewareStack<InputType, OutputType>' is not assignable to type 'MiddlewareStack<InputType, ServiceOutputTypes>'.
Types of property 'concat' are incompatible.
Type '<InputType extends InputType, OutputType extends OutputType>(from: MiddlewareStack<InputType, OutputType>) => MiddlewareStack<InputType, OutputType>' is not assignable to type '<InputType extends InputType, OutputType extends ServiceOutputTypes>(from: MiddlewareStack<InputType, OutputType>)
=> MiddlewareStack<InputType, OutputType>'.
Types of parameters 'from' and 'from' are incompatible.
Type 'import("C:/Users/zackp/Source/moonpig/moonpig-memberships-api/node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/types/dist-types/middleware").MiddlewareStack<InputType, OutputType>' is not assignable to type 'import("C:/Users/zackp/Source/moonpig/moonpig-memberships-api/node_module
s/@aws-sdk/types/dist-types/middleware").MiddlewareStack<InputType, OutputType>'.
Types of property 'add' are incompatible.
Type '{ (middleware: import("C:/Users/zackp/Source/moonpig/moonpig-memberships-api/node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/types/dist-types/middleware").InitializeMiddleware<InputType, OutputType>, options?: (import("C:/Users/zackp/Source/moonpig/moonpig-memberships-api/nod
e_modules/@aws-sdk/client-ssm/node...' is not assignable to type '{ (middleware: import("C:/Users/zackp/Source/moonpig/moonpig-memberships-api/node_modules/@aws-sdk/types/dist-types/middleware").InitializeMiddleware<InputType, OutputType>, options?: (import("C:/Users/zackp/Source/moonpig/moonpig-memberships-api/no
de_modules/@aws-sdk/types/dist-types/middleware").InitializeHandlerO...'.
Types of parameters 'middleware' and 'middleware' are incompatible.
Types of parameters 'next' and 'next' are incompatible.
Type 'import("C:/Users/zackp/Source/moonpig/moonpig-memberships-api/node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/types/dist-types/middleware").InitializeHandler<InputType, OutputType>' is not assignable to type 'import("C:/Users/zackp/Source/moonpig/moonpig-memberships-api
/node_modules/@aws-sdk/types/dist-types/middleware").InitializeHandler<InputType, OutputType>'.
Type 'Promise<import("C:/Users/zackp/Source/moonpig/moonpig-memberships-api/node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/types/dist-types/middleware").InitializeHandlerOutput<OutputType>>' is not assignable to type 'Promise<import("C:/Users/zackp/Source/moonpig/moonpig-m
emberships-api/node_modules/@aws-sdk/types/dist-types/middleware").InitializeHandlerOutput<OutputType>>'.
Type 'import("C:/Users/zackp/Source/moonpig/moonpig-memberships-api/node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/types/dist-types/middleware").InitializeHandlerOutput<OutputType>' is not assignable to type 'import("C:/Users/zackp/Source/moonpig/moonpig-memberships-api/
node_modules/@aws-sdk/types/dist-types/middleware").InitializeHandlerOutput<OutputType>'.
Types of property 'output' are incompatible.
Type 'OutputType' is not assignable to type 'OutputType'. Two different types with this name exist, but they are unrelated.
'OutputType' is assignable to the constraint of type 'OutputType', but 'OutputType' could be instantiated with a different subtype of constraint 'any'.
4 export interface DynamoDBDocumentPaginationConfiguration extends PaginationConfiguration {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 14 errors in 14 files.
Errors Files
1 node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/BatchExecuteStatementCommand.d.ts:33
1 node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/BatchWriteCommand.d.ts:60
1 node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/DeleteCommand.d.ts:45
1 node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/ExecuteStatementCommand.d.ts:29
1 node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/ExecuteTransactionCommand.d.ts:33
1 node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/GetCommand.d.ts:31
1 node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/PutCommand.d.ts:45
1 node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/QueryCommand.d.ts:47
1 node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/ScanCommand.d.ts:42
1 node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/TransactGetCommand.d.ts:37
1 node_modules/@aws-sdk/lib-dynamodb/dist-types/commands/TransactWriteCommand.d.ts:66
Expected behavior
tsc should compile
Issue Analytics
- State:
- Created 2 years ago
- Reactions:10
- Comments:14 (1 by maintainers)
Top Results From Across the Web
@aws-sdk/lib-dynamodb - npm
The document client simplifies working with items in Amazon DynamoDB by abstracting away the notion of attribute values.
Read more >@aws-sdk/client-rbin: Versions | Openbase
Full version history for @aws-sdk/client-rbin including change logs.
Read more >CHANGELOG.md · v3.92.0 · mirrors / aws / aws-sdk-js-v3 · GitCode
This release also supports Terraform file input from S3 and scheduling daily ... @aws-sdk/lib-dynamodb: correct homepage URL in package.json (#2485) ...
Read more >Media query in the code written to change layout for mobile is ...
Issue. The code below is for displaying a banner in the homepage of a WordPress site. The desktop version does render as expected...
Read more >How to Get Handwriting Animation With Irregular SVG Strokes
Because calligraphy fonts have uneven stroke widths (they actually aren't even strokes in terms of SVG), it was near impossible to do this ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It looks like the issue was introduced somewhere between
3.105.0
and3.109.0
(the versions in between those don’t exist on npm).3.105.0
is the latest version I can get to work without any type errors.I started having this issue when I had to downgrade the
@aws-sdk/client-dynamodb
dependency because of #4222 . I downgraded bothclient-dynamodb
andlib-dynamodb
to3.208.0
.I encountered this particular issue before. I usually remove
node_modules
andpackage-lock.json
and install the latest version of the sdk. But that didn’t help in this case as I needed a specific version to work around another issue.@WolfWalter lead me to the smithy-client (
npm list @aws-sdk/smithy-client
) It turned indeed out that version 2.215.0 was there and clashed with my own installed (and preferred) 3.208.0.I use
aws-sdk-client-mock@0.6.2
as a dev dependency for my unit tests and it has a peer dependency on"@aws-sdk/client-s3": "^3.0.0"
which takes 3.218.0 as a version and 3.215 as a smithy version. These are the latest versions at the moment of writing. These versions are obviously conflicting with the versions I actually want. (This also explains why it usually works when I upgrade my aws sdk dependencies to the latest version. The latest version will be the same as the one aws-sdk-client-mock selects.)So I started looking for an dynamodb dependency that’s compatible… I ended up with which did the trick.
I dug a little deeper: it’s also worthwhile to try upgrading
aws-sdk-client-mock
to 2.0.1 as it doesn’t have the peer dependency anymore (since 1.0.0, but that version introduced jest matchers and I don’t need jest. Jest is moved in 2.0.0).After I did that upgrade, I tried aws-sdk
3.208.0
again and it works like a charm now.Long story short (I hope it helps anyone here):
aws-sdk-client-mock
, upgrade it to the latest versionAs far as I understand it, this issue seems always caused by several different versions of the AWS sdk installed.