javascript – Getting TypeError: partitions is undefined in partitions.js file of aws sdk while getting secrets from aws
I am using @aws-sdk/client-secrets-manager in my frontend application to get the secrets from aws secret manager but I am getting “TypeError: partitions is undefined” error.
This is the code I am using.
import {
SecretsManagerClient,
GetSecretValueCommand,
} from "@aws-sdk/client-secrets-manager";
async function getAWSSecrets() {
const client = new SecretsManagerClient({
region: "my-region",
});
const command = new GetSecretValueCommand({
SecretId: "my-aws-arn",
});
try {
const response = await client.send(command);
console.log("Console response ", response);
} catch (error) {
console.error("Error retrieving secret:", error);
}
}
getAWSSecrets();
The version of @aws-sdk/client-secrets-manager is latest(3.337.0)
How can I fix this ?
Read more here: Source link