aws-sdk-js-v3
aws-sdk-js-v3 copied to clipboard
error TS2339: Property 'send' does not exist on type 'SecretsManagerClient'
Checkboxes for prior research
- [X] I've gone through Developer Guide and API reference
- [X] I've checked AWS Forums and StackOverflow.
- [X] I've searched for previous similar issues and didn't find any solution.
Describe the bug
I'm trying to bundle @aws-sdk/client-secrets-manager
into my nodeJs package with rollup.
Bundling is going good but when I'm generating the type file I got this error.
I'm using pnpm to manage my project.
SDK version number
@aws-sdk/client-secrets-manager@^3.583.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v20.9.0
Reproduction Steps
This is the code I'm trying to bundle:
import { GetSecretValueCommand, SecretsManagerClient } from "@aws-sdk/client-secrets-manager";
export const getAwsSecrets = async (region: string, secretName: string) => {
const client = new SecretsManagerClient({ region });
const response = await client.send(new GetSecretValueCommand({ SecretId: secretName }));
}
Observed Behavior
TypeScript compilation fails with Property 'send' does not exist on type 'SecretsManagerClient'.
Expected Behavior
TypeScript compilation succeeds
Possible Solution
No response
Additional Information/Context
No response