-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async function is exited prematurely #436
Comments
Hi @tommedema . This looks like the AWS Lambda runtime isn't awaiting the returned function (which internally is a promise). This does not seem to be an issue with webpack or the plugin in general, but more likely with TS or the resolver, as everything looks good in the configuration. According to https://aws.amazon.com/blogs/compute/node-js-8-10-runtime-now-available-in-aws-lambda/ someting like
should work. I'm not sure if the |
@HyperBrain you are correct that it is not related to webpack, sorry about that. Turns out that one of the promises was rejected but I didn't register a handler for this. I had to encapsulate all promises with |
This is a bug report
Description
For bug reports:
My handler function is defined as follows:
Together with the Typescript resolver, this compiles to:
Seems OK. But when running this on AWS lambda, the logs give:
The lambda should not end the request after logging the context. It should also log
generated project files...
webpack.config.js
serverless.yml
(see also #435)
tsconfig.json:
.../../tsconfig.json:
../../tsconfig.base.json:
I've also tried it with tsconfig.json:
But the effect is the same. Note that I am using yarn workspaces (see this repo for an example)
see above for the cloudwatch log
Note that when I run it locally the behavior is the same:
Additional Data
Serverless-Webpack Version you're using:
5.2.0
Webpack version you're using:
4.16.5
Serverless Framework Version you're using:
Serverless Version: 1.30.0
Operating System:
OS: darwin
Node Version: 8.11.3
The text was updated successfully, but these errors were encountered: