Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serverless-offline v8.6 and later unloads all modules when running on Windows, breaking plugins #1461

Closed
coyoteecd opened this issue May 31, 2022 · 1 comment

Comments

@coyoteecd
Copy link
Contributor

Bug Report

We are using serverless-offline in combination with (deprecated) serverless-offline-assume-role plugin to connect to a stage-specific AWS account. When upgrading to serverless-offline v8.6, we've noticed that the plugin doesn't work anymore, the credentials are "lost" after a few requests.

I did some debugging and I believe the issue is introduced by #1230 . The regexes that check for node_modules filepath were expanded to include the path separator, and they account only for the Unix-style separator. We use Windows for our dev boxes, and therefore serverless-offline keeps unloading all modules, regardless of whether they are in node_modules or not.

@dnalborczyk
Copy link
Collaborator

@coyoteecd v9 was released a couple days ago. could you see if that fixes your problems? worker threads are now used by default. if you want the handler to reload for development you can use --reloadHandler, which creates new lambda instances and discards previous ones.

closing this in the meanwhile. please open a new issue if this does not fix your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants