aditmalik-synechron / serverless-nested-stack

Serverless nested stack
42 stars 10 forks source link

deploy error with:Type Error [ E R R_ I N V A L I D_ C A L L B A C K] #9

Open jinliangshui opened 5 years ago

jinliangshui commented 5 years ago

when it goes to:Uploading CloudFormation file to S3...logStack.json this error appeared, and the console prints "Callback must be a function",

what happened? Can any one do me a favor please?

alyhegazy commented 5 years ago

Same here.

aniham commented 5 years ago

same

alyhegazy commented 5 years ago

@aniham I ended up using serverless-plugin-split-stacks. After struggling with some version conflicts with other serverless plugins it now works like a charm!

aniham commented 5 years ago

thanks for the pointer @alyhegazy, looking into it myself :)

willfarrell commented 5 years ago

This seems to be an issue when node10 is used. Switching to node8 seems to resolve it.

romainquellec commented 5 years ago

+1, trying serverless-plugin-split-stacks

desmondchou commented 4 years ago

apart from downgrade to node8 or switching to another plugin, you may also consider small and harmless changes the js files below to fix it.

node_modules\serverless-nested-stack\index.js rewrite fs.writeFile(this.packagePath + '/compiled-cloudformation-template.json', JSON.stringify(parentStack, null, ' ')); as fs.writeFile(this.packagePath + '/compiled-cloudformation-template.json', JSON.stringify(parentStack, null, ' '), () => { });

node_modules\serverless-nested-stack\lib\uploadArtifacts.js rewrite fs.writeFile(this.packagePath+'/'+compiledTemplateFileName,body); resolve() as fs.writeFile(this.packagePath+'/'+compiledTemplateFileName,body, () => { resolve() });

willfarrell commented 4 years ago

@desmondchou Maybe submit as a PR?

willjstevens commented 4 years ago

+1 Same