Closed valentin-dirken closed 1 month ago
In the code above I see you have a handler function. I don't follow what you are trying to do by looking at the code snippet. The code seems to be for a lambda function but you are trying to push the same zip for the lambda function but also for a layer ?
Can we close this?
This issue is being closed due to inactivity from the original requester.
Expected Behaviour
The code should work with the updated version of multi-agent-orchestrator (^0.0.13) just as it did with version ^0.0.12, without errors related to missing modules.
Current Behaviour
After updating to multi-agent-orchestrator version ^0.0.13, the Lambda function throws an error indicating that the module 'sylvester' cannot be found. The error trace shows that this issue originates from the multi-agent-orchestrator package's dependencies.
`Response { "errorType": "Runtime.ImportModuleError", "errorMessage": "Error: Cannot find module 'sylvester'\nRequire stack:\n- /opt/node_modules/apparatus/lib/apparatus/classifier/logistic_regression_classifier.js\n- /opt/node_modules/apparatus/lib/apparatus/index.js\n- /opt/node_modules/natural/lib/natural/classifiers/bayes_classifier.js\n- /opt/node_modules/natural/lib/natural/classifiers/index.js\n- /opt/node_modules/natural/lib/natural/index.js\n- /opt/node_modules/multi-agent-orchestrator/dist/agentOverlapAnalyzer.js\n- /opt/node_modules/multi-agent-orchestrator/dist/orchestrator.js\n- /opt/node_modules/multi-agent-orchestrator/dist/index.js", "trace": [ "Runtime.ImportModuleError: Error: Cannot find module 'sylvester'", "Require stack:", "- /opt/node_modules/apparatus/lib/apparatus/classifier/logistic_regression_classifier.js", "- /opt/node_modules/apparatus/lib/apparatus/index.js", "- /opt/node_modules/natural/lib/natural/classifiers/bayes_classifier.js", "- /opt/node_modules/natural/lib/natural/classifiers/index.js", "- /opt/node_modules/natural/lib/natural/index.js", "- /opt/node_modules/multi-agent-orchestrator/dist/agentOverlapAnalyzer.js", "- /opt/node_modules/multi-agent-orchestrator/dist/orchestrator.js", "- /opt/node_modules/multi-agent-orchestrator/dist/index.js", " at _loadUserApp (file:///var/runtime/index.mjs:1087:17)", " at async UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:1119:21)", " at async start (file:///var/runtime/index.mjs:1282:23)", " at async file:///var/runtime/index.mjs:1288:1" ] }
Function Logs ator/dist/index.js","reason":{"errorType":"Error","errorMessage":"Cannot find module 'sylvester'\nRequire stack:\n- /opt/node_modules/apparatus/lib/apparatus/classifier/logistic_regression_classifier.js\n- /opt/node_modules/apparatus/lib/apparatus/index.js\n- /opt/node_modules/natural/lib/natural/classifiers/bayes_classifier.js\n- /opt/node_modules/natural/lib/natural/classifiers/index.js\n- /opt/node_modules/natural/lib/natural/index.js\n- /opt/node_modules/multi-agent-orchestrator/dist/agentOverlapAnalyzer.js\n- /opt/node_modules/multi-agent-orchestrator/dist/orchestrator.js\n- /opt/node_modules/multi-agent-orchestrator/dist/index.js","code":"MODULE_NOT_FOUND","requireStack":["/opt/node_modules/apparatus/lib/apparatus/classifier/logistic_regression_classifier.js","/opt/node_modules/apparatus/lib/apparatus/index.js","/opt/node_modules/natural/lib/natural/classifiers/bayes_classifier.js","/opt/node_modules/natural/lib/natural/classifiers/index.js","/opt/node_modules/natural/lib/natural/index.js","/opt/node_modules/multi-agent-orchestrator/dist/agentOverlapAnalyzer.js","/opt/node_modules/multi-agent-orchestrator/dist/orchestrator.js","/opt/node_modules/multi-agent-orchestrator/dist/index.js"],"stack":["Error: Cannot find module 'sylvester'","Require stack:","- /opt/node_modules/apparatus/lib/apparatus/classifier/logistic_regression_classifier.js","- /opt/node_modules/apparatus/lib/apparatus/index.js","- /opt/node_modules/natural/lib/natural/classifiers/bayes_classifier.js","- /opt/node_modules/natural/lib/natural/classifiers/index.js","- /opt/node_modules/natural/lib/natural/index.js","- /opt/node_modules/multi-agent-orchestrator/dist/agentOverlapAnalyzer.js","- /opt/node_modules/multi-agent-orchestrator/dist/orchestrator.js","- /opt/node_modules/multi-agent-orchestrator/dist/index.js"," at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)"," at Module._load (node:internal/modules/cjs/loader:986:27)"," at Module.require (node:internal/modules/cjs/loader:1233:19)"," at require (node:internal/modules/helpers:179:18)"," at Object. (/opt/node_modules/apparatus/lib/apparatus/classifier/logistic_regression_classifier.js:26:17)"," at Module._compile (node:internal/modules/cjs/loader:1358:14)"," at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)"," at Module.load (node:internal/modules/cjs/loader:1208:32)"," at Module._load (node:internal/modules/cjs/loader:1024:12)"," at Module.require (node:internal/modules/cjs/loader:1233:19)"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: Error: Cannot find module 'sylvester'","Require stack:","- /opt/node_modules/apparatus/lib/apparatus/classifier/logistic_regression_classifier.js","- /opt/node_modules/apparatus/lib/apparatus/index.js","- /opt/node_modules/natural/lib/natural/classifiers/bayes_classifier.js","- /opt/node_modules/natural/lib/natural/classifiers/index.js","- /opt/node_modules/natural/lib/natural/index.js","- /opt/node_modules/multi-agent-orchestrator/dist/agentOverlapAnalyzer.js","- /opt/node_modules/multi-agent-orchestrator/dist/orchestrator.js","- /opt/node_modules/multi-agent-orchestrator/dist/index.js"," at process. (file:///var/runtime/index.mjs:1276:17)"," at process.emit (node:events:519:28)"," at emitUnhandledRejection (node:internal/process/promises:250:13)"," at throwUnhandledRejectionsMode (node:internal/process/promises:385:19)"," at processPromiseRejections (node:internal/process/promises:470:17)"," at process.processTicksAndRejections (node:internal/process/task_queues:96:32)"]}
INIT_REPORT Init Duration: 12992.17 ms Phase: invoke Status: error Error Type: Runtime.ImportModuleError
START RequestId: d0e67262-8d11-48f2-85d3-bf0abe329c74 Version: $LATEST
END RequestId: d0e67262-8d11-48f2-85d3-bf0abe329c74
REPORT RequestId: d0e67262-8d11-48f2-85d3-bf0abe329c74 Duration: 13040.25 ms Billed Duration: 13041 ms Memory Size: 128 MB Max Memory Used: 115 MB Status: error Error Type: Runtime.ImportModuleError
`
Code snippet
Possible Solution
The error seems to indicate a missing dependency ('sylvester'). The package multi-agent-orchestrator or one of its dependencies might have been updated in a way that introduces a missing dependency.
Steps to Reproduce
In AWS CloudShell : npm install multi-agent-orchestrator@latest && zip -r multi-agent-orchestrator-layer.zip node_modules && aws lambda publish-layer-version --layer-name multi-agent-orchestrator --zip-file fileb://multi-agent-orchestrator-layer.zip