serverless-optimizer-plugin icon indicating copy to clipboard operation
serverless-optimizer-plugin copied to clipboard

error with optimized lambda

Open stevecrozz opened this issue 8 years ago • 4 comments

I get this error on a lambda function when it has been optimized by this plugin. Without the plugin, the function works. I'm using the 'test' button from within the AWS console to produce this error:

{
  "errorMessage": "Cannot find module './aes'",
  "errorType": "Error",
  "stackTrace": [
    "Function.Module._resolveFilename (module.js:338:15)",
    "Function.Module._load (module.js:280:25)",
    "Module.require (module.js:364:17)",
    "require (module.js:380:17)",
    "i (/var/task/ivr/selection/handler.js:1:497)",
    "/var/task/ivr/selection/handler.js:1:688",
    "/var/task/ivr/selection/handler.js:12:25267",
    "Array.map (native)",
    "Object.a.exports (/var/task/ivr/selection/handler.js:12:25244)",
    "o (/var/task/ivr/selection/handler.js:12:25428)"
  ]
}

I'm not sure how to debug this. But I can gather more info if you ask for something in particular.

stevecrozz avatar Feb 02 '16 21:02 stevecrozz