-
Notifications
You must be signed in to change notification settings - Fork 417
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
Locally invoked functions clear webpack compiled code needed for functions which are called from locally invoked function #275
Comments
Hi @todda00 , thanks for reporting 👍 |
I have an idea to solve the problem. If you run We could introduce a switch for @todda00 What do you think of this approach? |
yes, a command line option for invoke local would work great for this situation, I was looking for something available when I ran into the issue, but there was nothing. |
I'll add the switch then for these use cases that allows executing a function out of a currently running offline compile. Please let me know if you have any better idea for the switch name - I'm not good in finding names 😄 . The only requirement is, that it should be prefixed with |
If it is not compiling at all, then perhaps --webpack-no-compile would be
applicable.
…On Tue, Nov 14, 2017 at 5:26 PM, Frank Schmid ***@***.***> wrote:
I'll add the switch then for these use cases that allows executing a
function out of a currently running offline compile. Please let me know if
you have any better idea for the switch name - I'm not good in finding
names 😄 . The only requirement is, that it should be prefixed with
--webpack for disambiguation.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#275 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AH-flNZr6KAX7ffwQxTxyAsqklZQksAlks5s2hODgaJpZM4QeD86>
.
|
Released with 5.1.0 |
This is a Bug Report
Description
When invoking a local function which publishes to an SNS topic, the called lambda function which is subscribed to the SNS topic fails due to the webpack compiled code being removed during the local invocation. This issue is only during local development, and using serverless-offline-sns.
Example repository to highlight the issue: https://github.com/todda00/serverless-offline-sns-example/tree/webpack-local-invoke-issue
Steps to reproduce:
Simply run
And then go to http://localhost:3000/ping to trigger the event, you should see "pong" appear in the console.
To see the issue with webpack, open a new command line (while serverless offline is still running) and run:
serverless invoke local -f ping
You will see the trace error in the terminal where serverless offline is running.
The .webpack folder is cleared out during validation and is only compiling the locally invoked function (ping), but the running offline instance needs the pong handler, which has been removed.
For bug reports:
compiled modules of other functions are removed during local invocations
both functions to be able to be ran in sequence without webpack removing the compiled code
see example repository: https://github.com/todda00/serverless-offline-sns-example/tree/webpack-local-invoke-issue
Similar or dependent issue(s):
Additional Data
see trace above
The text was updated successfully, but these errors were encountered: