Works locally, but the odd way the code tries to load the noswearing module does not work when bundled with esbuild and deployed into an AWS Lambda. (I expect the trouble is when bundling, not the ultimate run environment.)
ERROR Uncaught Exception
{
"errorType": "Runtime.ImportModuleError",
"errorMessage": "Error: Cannot find module '/var/task/src/infrastructure/player-api/custom_module/noswearing'\nRequire stack:\n- /var/task/src/infrastructure/player-api/register-player-lambda.js\n- /var/runtime/index.mjs",
"stack": [
"Runtime.ImportModuleError: Error: Cannot find module '/var/task/src/infrastructure/player-api/custom_module/noswearing'",
"Require stack:",
"- /var/task/src/infrastructure/player-api/register-player-lambda.js",
"- /var/runtime/index.mjs",
" at _loadUserApp (file:///var/runtime/index.mjs:951:17)",
" at async Object.UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:976:21)",
" at async start (file:///var/runtime/index.mjs:1137:23)",
" at async file:///var/runtime/index.mjs:1143:1"
]
}
Works locally, but the odd way the code tries to load the noswearing module does not work when bundled with esbuild and deployed into an AWS Lambda. (I expect the trouble is when bundling, not the ultimate run environment.)