You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched existing issues, it hasn't been reported yet
Issue description
We're using serverless in conjunction with serverless-webpack to transpile and bundle our lambda code (written in typescript). Everything is working fine with the serverless dashboard enabled, but breaks down if we remove it (by suppressing the org and app fields of the serverless.yml configuration file).
The error we get when invoking the lambda after disabling the dashboard references an import issue but we couldn't find out why, the packaged code seems perfectly identical as the one with the dashboard enabled :
{
"errorType": "Runtime.ImportModuleError",
"errorMessage": "Error: Cannot find module 'model'\nRequire stack:\n- /var/runtime/UserFunction.js\n- /var/runtime/Runtime.js\n- /var/runtime/index.js",
"stack": [
"Runtime.ImportModuleError: Error: Cannot find module 'model'",
"Require stack:",
"- /var/runtime/UserFunction.js",
"- /var/runtime/Runtime.js",
"- /var/runtime/index.js",
" at _loadUserApp (/var/runtime/UserFunction.js:225:13)",
" at Object.module.exports.load (/var/runtime/UserFunction.js:300:17)",
" at Object.<anonymous> (/var/runtime/index.js:43:34)",
" at Module._compile (internal/modules/cjs/loader.js:1085:14)",
" at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)",
" at Module.load (internal/modules/cjs/loader.js:950:32)",
" at Function.Module._load (internal/modules/cjs/loader.js:790:12)",
" at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)",
" at internal/main/run_main_module.js:17:47"
]
}
Some issue on AWS side where it's runtime module crashes most likely on attempt of resolving the handler. I would report it to AWS, as even if there's an issue with handler you should not see this kind of crash (note that in stack trace there are only AWS runtime modules involved)
Issue with your configuration or webpack plugin. Dashboard plugin when on, was most likely fixing this issue by reconfiguring the handler. Now when it's off, it's purely webpack plugin that messes with handler configuration. If it crashes you should either resort to your config or report at webpack plugin repository
Thanks a lot @medikoo It definitely seems like the problem is 2. Where can I find the code used by serverless to reconfigure handler when the dashboard is on. This might help me understand what's wrong with the webpack configuration.
Are you certain it's a bug?
Is the issue caused by a plugin?
Are you using the latest v3 release?
Is there an existing issue for this?
Issue description
We're using serverless in conjunction with serverless-webpack to transpile and bundle our lambda code (written in typescript). Everything is working fine with the serverless dashboard enabled, but breaks down if we remove it (by suppressing the
org
andapp
fields of the serverless.yml configuration file).The error we get when invoking the lambda after disabling the dashboard references an import issue but we couldn't find out why, the packaged code seems perfectly identical as the one with the dashboard enabled :
our tsconfig file :
We're targeting node14 runtimes on aws.
Service configuration (serverless.yml) content
N/A
Command name and used flags
serverless deploy
Command output
Environment information
The text was updated successfully, but these errors were encountered: