serverless-nested-stack
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]
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?
Same here.
same
@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!
thanks for the pointer @alyhegazy, looking into it myself :)
This seems to be an issue when node10 is used. Switching to node8 seems to resolve it.
+1, trying serverless-plugin-split-stacks
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 Maybe submit as a PR?
+1 Same