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

Cannot find module './924.js after upgrade from v3.490.0 to v3.540.0 #5990

Closed
3 tasks done
nikimicallef opened this issue Apr 10, 2024 · 3 comments
Closed
3 tasks done
Assignees
Labels
bug This issue is a bug. closed-for-staleness p3 This is a minor priority issue response-requested Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.

Comments

@nikimicallef
Copy link

Checkboxes for prior research

Describe the bug

I actually do not know how to phrase this because I do not have much information to go off so if there is more information I can provide please tell me.
I upgraded my lambdas from using client-s3, client-sqs, util-dynamodb and client-dynamodb from 3.490.0 to 3.540.0 and suddenly the execution of the lambda started failing. The stack trace I get is the following

{
    "errorType": "Error",
    "errorMessage": "Cannot find module './924.js'\nRequire stack:\n- /var/task/requestDeletion.js\n- /var/runtime/index.mjs",
    "code": "MODULE_NOT_FOUND",
    "requireStack": [
        "/var/task/requestDeletion.js",
        "/var/runtime/index.mjs"
    ],
    "stack": [
        "Error: Cannot find module './924.js'",
        "Require stack:",
        "- /var/task/requestDeletion.js",
        "- /var/runtime/index.mjs",
        "    at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15)",
        "    at Module._load (node:internal/modules/cjs/loader:975:27)",
        "    at Module.require (node:internal/modules/cjs/loader:1225:19)",
        "    at require (node:internal/modules/helpers:177:18)",
        "    at r.f.require (/var/task/requestDeletion.js:2:621367)",
        "    at /var/task/requestDeletion.js:2:620954",
        "    at Array.reduce (<anonymous>)",
        "    at r.e (/var/task/requestDeletion.js:2:620932)",
        "    at /var/task/requestDeletion.js:2:342764",
        "    at /var/task/requestDeletion.js:2:380557"
    ]
}

Unfortunately, since the code is in TypeScript, I do not know exactly why this code is failing but from what I can see, it is related to the credentials handling since there is a reference to the credentials-provider-node slightly earlier. I think the issue is around the authentication between the lambda and Dynamo DB when using the DynamoDB client but I am not sure. Reverting back to v 3.490.0 seems to solve the issue but it doesn't get me closer to understanding the root cause.

Has there been a change in the transitive dependency to the DynamoDB client and the credentials-provider-node? It is some dependency that I am missing? I tried to find some release notes but I could not find any.

SDK version number

@aws-sdk/package-name@version, ...

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

v18

Reproduction Steps

Upgrading from v3.490.0 to v3.540.0

Observed Behavior

Execution failed with exception

Expected Behavior

Execution is successful as it was previously

Possible Solution

No response

Additional Information/Context

No response

@nikimicallef nikimicallef added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 10, 2024
@kuhe
Copy link
Contributor

kuhe commented Apr 10, 2024

Missing a file with a number as the name indicates it may be a chunk file generated by e.g. Webpack.

One thing to check is whether your generated or output bundle code has all been uploaded to the Lambda.

@aBurmeseDev aBurmeseDev self-assigned this Apr 22, 2024
@aBurmeseDev
Copy link
Member

Hi @nikimicallef - thanks for reaching out.

Has there been a change in the transitive dependency to the DynamoDB client and the credentials-provider-node? It is some dependency that I am missing?

I wasn't able to find any breaking changes around DynamoDB client or the credentials-provider-node that would cause this error. As mentioned by my colleague above, I would check to confirm if your bundle code has all completely uploaded to Lambda and/or try to locate the file name within your dependencies.

If issue persists, please share your code and list of dependencies you have.

Best,
John

@aBurmeseDev aBurmeseDev added response-requested Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days. p3 This is a minor priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Apr 22, 2024
Copy link

github-actions bot commented May 3, 2024

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.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels May 3, 2024
@github-actions github-actions bot closed this as completed May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. closed-for-staleness p3 This is a minor priority issue response-requested Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.
Projects
None yet
Development

No branches or pull requests

3 participants