Serverless lamdas uses cached handler code, yet watcher detected changes and recompiles. How to fix?

123 Views Asked by At

Our setup uses basic serverless library with:

  • serverless-offline plugin
  • serverless-webpack or serverless-typescript plugin
  • Node

What is happening: File system watcher is running. And is properly triggered everytime you make a change in your source. It should support hot module replacement. Yet the output of Lambda handler doesn't change.

What should happen: Lamda handler code should be updated.

1

There are 1 best solutions below

0
On

To resolve that upgrade you serverless-offline library.

Not-affected versions are bellow 6.0.0 (with additional issues) and above 6.8.0 (working properly)

This bug was reported to owners or serverless-offline repository and was resolved with caveats.

-- There are multiple bug reports in github and no clear answer.