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
Hi @BowgartField - thanks for reaching out.
Can you try deleting your node_modules and package-lock.json and try running pnpm add/install again to see if it resolves the error?
Best,
John
Hi @BowgartField - thanks for reaching out.
Can you try deleting your
node_modulesandpackage-lock.jsonand try running pnpm add/install again to see if it resolves the error? Best, John
Hi, I tried deleting my package node_modules + my monorepo node_modules and deleting pnpm-lock.json but it's still not working.
~+1~
@BowgartField I had preserverSymlinks set to true. deleted it, got me going.
@BowgartField Can you try the suggestion by @macstr1k3r and confirm if it resolves your issue as well?
This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.