Skip to content

fix deploy error on node.js 10 #12

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

desmondchou
Copy link

added callback function parameter when calling fs.writeFile in order to address issue #9

@willfarrell
Copy link

@aditmalik-synechron Any chance we can get this merged in? node v8 is end of life next month on AWS.

@dunin
Copy link

dunin commented Mar 14, 2020

This patch works for me as expected.

@sverraest
Copy link

Can this be merged please? AWS Lambda Node 8 runtime has been deprecated for a while now and this is causing deployment issues.

@kedarnag138
Copy link

Facing the same issue as the rest, please have this merged. Thanks!

@vKongv
Copy link

vKongv commented Sep 18, 2020

Any chance that we get this merged? Or any other package that has similar functionality out there?

@@ -107,8 +107,7 @@ class ServerlessNestedPlugin {

this.serverless.service.provider.compiledCloudFormationTemplate = parentStack;
fs.writeFile(this.packagePath + '/compiled-cloudformation-template.json',
JSON.stringify(parentStack, null, ' '));
resolve();
JSON.stringify(parentStack, null, ' '), () => { resolve(); });
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we actually need to move resolve() into the callback?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JSON.stringify(parentStack, null, ' '), resolve);
This can probably work. However, I am no longer using this plugin already. I have revamped the lambda functions and shrink the no of objects.

@vKongv
Copy link

vKongv commented Sep 18, 2020 via email

@desmondchou
Copy link
Author

Luckily I managed to do it by consolidating handler functions. Reducing number of functions bring the total number of objects down below 200

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

Successfully merging this pull request may close these issues.

6 participants