Closed web-fu closed 1 year ago
Hi,
Sorry for the delay answering. I need a sample project to be able to reproduce the issue and give you a solution.
I removed the middleware from my project without saving any commit :( I created a new project with all the packages I used, but now middleware don't transpile. Any help would be usefull: https://github.com/web-fu/serverless-middleware
This issue when off my radar. Sorry for slow response.
serverless-offline
doesn't trigger it's own events consistently. I'll fix that on my side.
In the meantime, you can workaround running serverless offline start
.
Also, your path to logger is wrong. You should use:
middleware:
pre:
- .middleware/logger.logMiddleware
I want to test my application locally so I use serverless-online. Without attaching a middleware, any endpoint work fine, but when I attach the middleware it fails to find the module built:
here there is the releant part of my serverless.yaml file
I noticed that running
npm install && serverless offline
works fine until I call my endpointThe module is correctly created in the directory, but seems that cannot be loaded correctly.