https://pulumi.com logo
Title
c

clever-soccer-98174

11/30/2022, 3:05 AM
Hi All 🙂 Do you know what would be the reason that I’m getting following error when I hit the endpoint of
aws.lambda.CallbackFunction
{
  "errorType": "Error",
  "errorMessage": "Cannot find module 'tslib'\nRequire stack:\n- /var/task/__index.js\n- /var/runtime/index.mjs",
  "code": "MODULE_NOT_FOUND",
  "requireStack": [
    "/var/task/__index.js",
    "/var/runtime/index.mjs"
  ],
  "stack": [
    "Error: Cannot find module 'tslib'",
    "Require stack:",
    "- /var/task/__index.js",
    "- /var/runtime/index.mjs",
    "    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)",
    "    at Function.Module._load (node:internal/modules/cjs/loader:778:27)",
    "    at Module.require (node:internal/modules/cjs/loader:1005:19)",
    "    at require (node:internal/modules/cjs/helpers:102:18)",
    "    at /var/task/__index.js:5:21",
    "    at Runtime.__f0 [as handler] (/var/task/__index.js:14:6)",
    "    at Runtime.handleOnceNonStreaming (file:///var/runtime/index.mjs:1089:29)"
  ]
}
l

little-cartoon-10569

11/30/2022, 3:39 AM
Looks like you're missing some dependency. Have you bundled all the required libraries into your .zip?
c

clever-soccer-98174

11/30/2022, 5:05 AM
OK it appears, it is a problem of being in monorepo, when I move it to the standalone pulumi project things are working
I’m using new awsx.apigateway.API , inline callback , so I didnt need to bundle myself
l

little-cartoon-10569

11/30/2022, 5:18 AM
Sorted then? Or still having issues?
c

clever-soccer-98174

11/30/2022, 5:18 AM
Yes it is sorted :) thanks