Closed ivanmartos closed 8 months ago
I experienced the same issue, however it works as it should up to v0.4.30 for us. Thus, likely introduced in v0.4.31
the module could not be found because the handlers path was '.webpack/service/src/helloWorld.handler' instead of 'src/helloWorld.handler' as it should be
Not sure if it is 100% related but when we deploy our solution to localstack it works correctly, but when we deploy to aws, the handler paths are incorrect, just as @sirimykland describes. We've made a node patch with patch-package and it solves the issue for us. I've attached the patch here (rename it from serverless-localstack+0.4.35.txt
to serverless-localstack+0.4.35.patch
to apply it)
serverless-localstack+0.4.35.txt
Added a PR for a fix that resolved our issue..
Hi all - thank you for raising this issue and thank you @aahdahl for pushing a fix! @ivanmartos would you be able to pull the latest version and double check whether the issue persists? Thank you!
Closing the issue due to inactivity. The issue should already be resolved in the latest release.
I tried integrating this plugin with localstack and also with serverless-webpack, but it is not working
Versions I used
Sample repository with steps on how to simulate the issues is
https://github.com/ivanmartos/serverless-localstack-example
When using deploying to localstack the deployment succeeds but when invoking the endpoint I get an error
Runtime.ImportModuleError
When running locally via serverless-offline plugin everything works correctly. Webpack is used for both approaches (localstack and also offline)
Error returned from invocation of lambda via browser (when deployed in localstack)
Error log in localstack docker container
Deploying to localstack via serverless does not give any errors