Error: Cannot find module './rapid-client.node'
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- docker, node.js, typescript
Research direction
Start by reproducing the reported Lambda Docker setup with the alternative base image, then inspect the installed aws-lambda-ric package and the NativeModuleLoader path in node_modules/aws-lambda-ric/dist/index.mjs. Done means the package includes a loadable rapid-client.node and the runtime starts successfully without the MODULE_NOT_FOUND error.
Written by the indexing model from the issue text.
Description
Hello, I am getting this error trying to run a docker on a lambda using an alternative base image with the runtime interface client.
`7 Apr 2024 14:01:50,774 [INFO] (rapid) exec '/usr/local/bin/npx' (cwd=/function, handler=index.handler)
17 Apr 2024 14:01:57,708 [INFO] (rapid) INIT START(type: on-demand, phase: init)
17 Apr 2024 14:01:57,709 [INFO] (rapid) The extension's directory "/opt/extensions" does not exist, assuming no extensions to be loaded.
START RequestId: 79953563-5601-4e3c-b77c-ab118b367ef4 Version: $LATEST
17 Apr 2024 14:01:57,711 [INFO] (rapid) Starting runtime without AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN , Expected?: false
Executing 'index.handler' in function directory '/function'
node:internal/modules/cjs/loader:1140
const err = new Error(message);
^
Error: Cannot find module './rapid-client.node'
Require stack:
- /function/node_modules/aws-lambda-ric/dist/index.mjs
at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
at Module._load (node:internal/modules/cjs/loader:981:27)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:177:18)
at NativeModuleLoader.js.exports.load (file:///function/node_modules/aws-lambda-ric/dist/index.mjs:439:26)
at new RAPIDClient (file:///function/node_modules/aws-lambda-ric/dist/index.mjs:454:74)
at run (file:///function/node_modules/aws-lambda-ric/dist/index.mjs:1411:18)
at file:///function/node_modules/aws-lambda-ric/bin/index.mjs:14:7
at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:337:24) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/function/node_modules/aws-lambda-ric/dist/index.mjs' ]
}
Node.js v18.20.2
17 Apr 2024 14:01:58,891 [WARNING] (rapid) First fatal error stored in appctx: Runtime.ExitError
17 Apr 2024 14:01:58,892 [WARNING] (rapid) Process runtime-1 exited: exit status 1
17 Apr 2024 14:01:58,892 [INFO] (rapid) INIT RTDONE(status: error)
17 Apr 2024 14:01:58,892 [INFO] (rapid) INIT REPORT(durationMs: 1185.888000)
17 Apr 2024 14:01:58,892 [ERROR] (rapid) Init failed InvokeID= error=Runtime exited with error: exit status 1
17 Apr 2024 14:01:58,893 [WARNING] (rapid) Shutdown initiated: spindown
17 Apr 2024 14:01:58,893 [INFO] (rapid) Waiting for runtime domain processes termination
17 Apr 2024 14:01:58,894 [INFO] (rapid) INIT START(type: on-demand, phase: invoke)
17 Apr 2024 14:01:58,894 [INFO] (rapid) The extension's directory "/opt/extensions" does not exist, assuming no extensions to be loaded.
17 Apr 2024 14:01:58,894 [INFO] (rapid) INIT REPORT(durationMs: 0.060000)
17 Apr 2024 14:01:58,894 [INFO] (rapid) INVOKE START(requestId: 0fd547e3-fe80-44eb-a9e2-67b5cb4b8000)
17 Apr 2024 14:01:58,894 [ERROR] (rapid) Invoke failed error=Runtime exited with error: exit status 1 InvokeID=0fd547e3-fe80-44eb-a9e2-67b5cb4b8000
17 Apr 2024 14:01:58,897 [ERROR] (rapid) Invoke DONE failed: Sandbox.Failure
17 Apr 2024 14:01:58,897 [WARNING] (rapid) Reset initiated: ReleaseFail
17 Apr 2024 14:01:58,897 [INFO] (rapid) Waiting for runtime domain processes termination`
The rapid-client library is installed but does not have an exportable node file.
- Dominant language
- TypeScript
- Stars
- 224
- Forks
- 60
- Avg merge
- 26m
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws/aws-lambda-nodejs-runtime-interface-client
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
aws/aws-lambda-nodejs-runtime-interface-client#198 · 3 comments · 6 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
aws/aws-lambda-nodejs-runtime-interface-client#195 · 12 reactions ·
-
bug
aws/aws-lambda-nodejs-runtime-interface-client#170 · 15 comments · 6 reactions · 1 assignee ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 38/100
aws/aws-lambda-nodejs-runtime-interface-client#159 · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
aws/aws-lambda-nodejs-runtime-interface-client#145 · 1 comment · 6 reactions ·
All issues in aws/aws-lambda-nodejs-runtime-interface-client
Similar issues
-
clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
ZCode 3.14.3 に対応する Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
supermomonga/zcode-acp#24 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
growthbook/growthbook#7100 ·
-
triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100