Closed ADrejta closed 3 years ago
Hi,
Sorry for the very late response.
The problem is that the webpack plugin is trying to process the handlers before middleware plugin processes them into a single handler. You must declare this plugin before the webpack one.
Using then
or not, should make absolutely no difference. I suspect that the problem is also with the webpack plugin being declared earlier in the chain.
Closing since there is no response and a solution has been given.
Feel free to reopen if there is anything else to look at.
I have the same problem. I use this plugins:
plugins:
- serverless-middleware
- serverless-webpack
- serverless-domain-manager
- serverless-webpack-layers
- serverless-offline
- serverless-plugin-datadog
- serverless-prune-plugin
Your Environment Information ---------------------------
Operating System: linux
Node Version: 14.15.4
Framework Version: 2.30.3 (local)
Plugin Version: 4.5.1
SDK Version: 4.2.0
Components Version: 3.7.5
This is a simple problem, when I run my serverless offline I use sls offline
only, but, if you use server offline start
it's work!
For more information: https://github.com/dherault/serverless-offline#usage-with-serverless-dynamodb-local-and-serverless-webpack-plugin
When using serverless-middleware Im getting this error when i want to start serverless offline
Here is how i have it setup at the moment:
serverless.yml:
resetPassword.yml
verifyToken.ts
resetPassword.ts
When i leave only one handler the error does not appear, however then i cannot use the middleware as described in the docs.
Serverless-offilne version: 6.8.0 Serverless-middleware version: 0.0.10 Node version: 14.0.0
P.S: When i try to do it with the then: keyword like this:
I'm getting this error: