Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(0 , import_core.setFeature) is not a function error when run PutCommand #6560

Closed
3 of 4 tasks
nelmasry opened this issue Oct 11, 2024 · 2 comments
Closed
3 of 4 tasks
Assignees
Labels
bug This issue is a bug. duplicate This issue is a duplicate. needs-triage This issue or PR still needs to be triaged.

Comments

@nelmasry
Copy link

nelmasry commented Oct 11, 2024

Checkboxes for prior research

Describe the bug

I'm making a simple PutCommand to test sdk but failed with error (0 , import_core.setFeature) is not a function
using "@aws-sdk/lib-dynamodb": "3.669.0",

here is my code

import { DynamoDBDocumentClient, PutCommand } from "@aws-sdk/lib-dynamodb";
import { DynamoDBClient } from "@aws-sdk/client-dynamodb";

const ddbClient = new DynamoDBClient({ region: "us-east-1" });
const ddbDocClient = DynamoDBDocumentClient.from(ddbClient);

//@ts-ignore
const insertData = async (contentItem: any) => {
    const putCommand = new PutCommand({
        TableName: "test",
        Item: {
            itemId: "050f6808-2768-498a-892a-44998c782576",
            category: "test"
        },
    });
    try {
        // Send the PutCommand to insert the item
        const result = await ddbDocClient.send(putCommand);
        console.log("Data inserted successfully:", result);
    } catch (err) {
        console.error("Error inserting data:", err);
    }
};

Regression Issue

  • Select this option if this issue appears to be a regression.

SDK version number

@aws-sdk/lib-dynamodb": "3.669.0

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

@types/node": "^18.15.11, "node": ">=16.0.0"

Reproduction Steps

Just run the code

Observed Behavior

message: '(0 , import_core.setFeature) is not a function'

Expected Behavior

PutCommand run successfully without errors

Possible Solution

No response

Additional Information/Context

No response

@nelmasry nelmasry added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 11, 2024
@aBurmeseDev aBurmeseDev self-assigned this Oct 11, 2024
@aBurmeseDev aBurmeseDev added the duplicate This issue is a duplicate. label Oct 11, 2024
@aBurmeseDev
Copy link
Member

Hi @nelmasry - thanks for reaching out.

We have previously received a report regarding this particular behavior, and here is the issue: #6549. A PR addressing the issue has been merged. For more information and guidance, please refer to the mentioned GitHub issue. This will be closed as it is a duplicate of the existing one.

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug. duplicate This issue is a duplicate. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants