serverless-nested-stack icon indicating copy to clipboard operation
serverless-nested-stack copied to clipboard

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

Open jinliangshui opened this issue 6 years ago • 9 comments

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?

jinliangshui avatar Nov 07 '18 10:11 jinliangshui

Same here.

alyhegazy avatar Nov 08 '18 01:11 alyhegazy

same

aniham avatar Dec 05 '18 22:12 aniham

@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!

alyhegazy avatar Dec 05 '18 22:12 alyhegazy

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

aniham avatar Dec 05 '18 22:12 aniham

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

willfarrell avatar Dec 11 '18 21:12 willfarrell

+1, trying serverless-plugin-split-stacks

romainquellec avatar Mar 20 '19 14:03 romainquellec

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() });

desmondchou avatar Oct 10 '19 03:10 desmondchou

@desmondchou Maybe submit as a PR?

willfarrell avatar Oct 10 '19 21:10 willfarrell

+1 Same

willjstevens avatar Jun 29 '20 16:06 willjstevens