Closed Bhirahaspathi-Sairam closed 1 year ago
Hi @Bhirahaspathi-Sairam,
You need to declare the warmup plugin after the webpack plugin to avoid it being transpiled as it is not needed.
Cheers!
@juanjoDiaz I have declared warmup plugin after the webpack plugin but still getting this issue 🤔 .
Hi @andrzej-hanusek-tg ,
I get a lot of these and it's always something to do with the different bundling pluging using different lifecycle hooks. Which also impacted by the order in which you declare the plugins.
I have no idea of which bundling plugin you are using, in which order you are declaring the plugins, which versions are you using, etc. So I need more context if you need help. A sample project where I can reproduce the issue is the faster way.
I can't do anything about webpack plugin lifecycle hook.
You might want to install @aws-sdk/client-lambda
as a dev dependency so webpack can do the bundling (even if warmup then ignores the bundled version of the lambda) or configure it as a external dependency that webpack should try to bundle as it is installed globally in the lambda.
@juanjoDiaz Downgrading plugin to the 8.1.0 helps.
That's because 8.2 changes the runtime of the plugin to node 18 which uses the new serverless SDK.
As said, you can add @aws-sdk/client-lambda
as a dev dependency and the error should go away.
However, the issue is still that the webpack plugin shouldn't be bundling the warmer lambda.
I am using serverless warm up plugin in my project and it fails while bundling with webpack. I am not sure what the issue is.Below is the configs
I have enabled warmup at function specific level.
Here is the output from jenkins
Can anyone tell me why its happening