STS Command type mismatch between dependencies? #4962
-
Hello there. So I've run into an issue with type mismatching that I can't really seem to tell why. I am using the When going to the definitions, this is what I get: AssumeRoleWithSAMLCommand: import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
import { AssumeRoleWithSAMLRequest, AssumeRoleWithSAMLResponse } from "../models/models_0";
import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient";
// omitted various comment
export declare class AssumeRoleWithSAMLCommand extends $Command<AssumeRoleWithSAMLCommandInput, AssumeRoleWithSAMLCommandOutput, STSClientResolvedConfig> {
readonly input: AssumeRoleWithSAMLCommandInput;
static getEndpointParameterInstructions(): EndpointParameterInstructions;
/**
* @public
*/
constructor(input: AssumeRoleWithSAMLCommandInput);
/**
* @internal
*/
resolveMiddleware(stack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<AssumeRoleWithSAMLCommandInput, AssumeRoleWithSAMLCommandOutput>;
/**
* @internal
*/
private serialize;
/**
* @internal
*/
private deserialize;
} Command: import { Command as ICommand, Handler, MetadataBearer, MiddlewareStack as IMiddlewareStack } from "@smithy/types";
/**
* @public
*/
export declare abstract class Command<Input extends ClientInput, Output extends ClientOutput, ResolvedClientConfiguration, ClientInput extends object = any, ClientOutput extends MetadataBearer = any> implements ICommand<ClientInput, Input, ClientOutput, Output, ResolvedClientConfiguration> {
abstract input: Input;
readonly middlewareStack: IMiddlewareStack<Input, Output>;
abstract resolveMiddleware(stack: IMiddlewareStack<ClientInput, ClientOutput>, configuration: ResolvedClientConfiguration, options: any): Handler<Input, Output>;
} Client import { Client as IClient, Command, MetadataBearer, MiddlewareStack, RequestHandler } from "@smithy/types";
// ...
export declare class Client<HandlerOptions, ClientInput extends object, ClientOutput extends MetadataBearer, ResolvedClientConfiguration extends SmithyResolvedConfiguration<HandlerOptions>> implements IClient<ClientInput, ClientOutput, ResolvedClientConfiguration> {
middlewareStack: MiddlewareStack<ClientInput, ClientOutput>;
readonly config: ResolvedClientConfiguration;
constructor(config: ResolvedClientConfiguration);
send<InputType extends ClientInput, OutputType extends ClientOutput>(command: Command<ClientInput, InputType, ClientOutput, OutputType, SmithyResolvedConfiguration<HandlerOptions>>, options?: HandlerOptions): Promise<OutputType>;
send<InputType extends ClientInput, OutputType extends ClientOutput>(command: Command<ClientInput, InputType, ClientOutput, OutputType, SmithyResolvedConfiguration<HandlerOptions>>, cb: (err: any, data?: OutputType) => void): void;
send<InputType extends ClientInput, OutputType extends ClientOutput>(command: Command<ClientInput, InputType, ClientOutput, OutputType, SmithyResolvedConfiguration<HandlerOptions>>, options: HandlerOptions, cb: (err: any, data?: OutputType) => void): void;
destroy(): void;
} The error that I'm getting is as follows:
My dependencies: "dependencies": {
"@aws-sdk/client-sts": "^3.369.0",
"@aws-sdk/shared-ini-file-loader": "^3.369.0",
"@aws-sdk/util-arn-parser": "^3.310.0",
"axios": "^1.4.0",
"cheerio": "^1.0.0-rc.12",
"commander": "^11.0.0",
"figlet": "^1.6.0",
"prompts": "^2.4.2"
},
"devDependencies": {
"@types/node": "^20.4.1",
"@types/prompts": "^2.4.4",
"typescript": "^5.1.6"
} package.json of @aws-sdk/client-sts in node_modules: {
"name": "@aws-sdk/client-sts",
"description": "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",
"version": "3.369.0",
... ,
"main": "./dist-cjs/index.js",
"types": "./dist-types/index.d.ts",
"module": "./dist-es/index.js",
"sideEffects": false,
"dependencies": {
"@aws-crypto/sha256-browser": "3.0.0",
"@aws-crypto/sha256-js": "3.0.0",
"@aws-sdk/credential-provider-node": "3.369.0",
"@aws-sdk/middleware-host-header": "3.369.0",
"@aws-sdk/middleware-logger": "3.369.0",
"@aws-sdk/middleware-recursion-detection": "3.369.0",
"@aws-sdk/middleware-sdk-sts": "3.369.0",
"@aws-sdk/middleware-signing": "3.369.0",
"@aws-sdk/middleware-user-agent": "3.369.0",
"@aws-sdk/types": "3.369.0",
"@aws-sdk/util-endpoints": "3.369.0",
"@aws-sdk/util-user-agent-browser": "3.369.0",
"@aws-sdk/util-user-agent-node": "3.369.0",
"@smithy/config-resolver": "^1.0.1",
"@smithy/fetch-http-handler": "^1.0.1",
"@smithy/hash-node": "^1.0.1",
"@smithy/invalid-dependency": "^1.0.1",
"@smithy/middleware-content-length": "^1.0.1",
"@smithy/middleware-endpoint": "^1.0.1",
"@smithy/middleware-retry": "^1.0.1",
"@smithy/middleware-serde": "^1.0.1",
"@smithy/middleware-stack": "^1.0.1",
"@smithy/node-config-provider": "^1.0.1",
"@smithy/node-http-handler": "^1.0.1",
"@smithy/protocol-http": "^1.1.0",
"@smithy/smithy-client": "^1.0.2",
"@smithy/types": "^1.1.0",
"@smithy/url-parser": "^1.0.1",
"@smithy/util-base64": "^1.0.1",
"@smithy/util-body-length-browser": "^1.0.1",
"@smithy/util-body-length-node": "^1.0.1",
"@smithy/util-defaults-mode-browser": "^1.0.1",
"@smithy/util-defaults-mode-node": "^1.0.1",
"@smithy/util-retry": "^1.0.1",
"@smithy/util-utf8": "^1.0.1",
"fast-xml-parser": "4.2.5",
"tslib": "^2.5.0"
},
"devDependencies": {
"@aws-sdk/service-client-documentation-generator": "3.310.0",
"@smithy/service-client-documentation-generator": "^1.0.1",
"@tsconfig/node14": "1.0.3",
"@types/node": "^14.14.31",
"concurrently": "7.0.0",
"downlevel-dts": "0.10.1",
"rimraf": "3.0.2",
"typedoc": "0.23.23",
"typescript": "~4.9.5"
},
... ,
"repository": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-js-v3.git",
"directory": "clients/client-sts"
}
} package.json of @smithy/smithy-client in node_modules {
"name": "@smithy/smithy-client",
"version": "1.0.4",
... ,
"main": "./dist-cjs/index.js",
"module": "./dist-es/index.js",
"types": "./dist-types/index.d.ts",
... ,
"dependencies": {
"@smithy/middleware-stack": "^1.0.2",
"@smithy/types": "^1.1.1",
"@smithy/util-stream": "^1.0.2",
"tslib": "^2.5.0"
},
... ,
"repository": {
"type": "git",
"url": "https://github.com/awslabs/smithy-typescript.git",
"directory": "packages/smithy-client"
},
"devDependencies": {
"@tsconfig/recommended": "1.0.1",
"@types/node": "^14.14.31",
"concurrently": "7.0.0",
"downlevel-dts": "0.10.1",
"jest": "28.1.1",
"rimraf": "3.0.2",
"typedoc": "0.23.23",
"typescript": "~4.9.5"
},
...
} I've been trying to cross-reference the packages but I seem to be unable to figure out why this is an issue. I suspect I somehow have conflicting packages, but since I use the most recent packages from So if anyone's got an answer for this, would love to hear from you. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I ran into this issue as well and ended up just reverting all |
Beta Was this translation helpful? Give feedback.
-
Hi @jesperseverinsen, sorry to hear about your issues. This seems to be a version conflicting issue, so that could you please try removing your Please let me know if that helps! Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
Hi @jesperseverinsen, sorry to hear about your issues. This seems to be a version conflicting issue, so that could you please try removing your
package-lock.json
file and runningnpm install
.Please let me know if that helps!
Thanks!