I got error while converting docx to epub.
I have increased stack size but task is vain.
The error:
RangeError: Maximum call stack size exceeded
at Array.filter (native)
at writeAll (D:\xxx\WorkingFolder\xxxx\public\node_modules\mammoth\lib\html-generator.js:73:15)
at Object.text (D:\xxxx\WorkingFolder\ACS_Live\public\node_modules\mammoth\lib\html-generator.js:12:13)
at DocumentConversion.elementConverters.text (D:\xxxx\WorkingFolder\x_x\public\node_modules\mammoth\lib\document-to-html.js:229:18)
at elementToHtml (D:\xxxx\WorkingFolder\xx_xx\public\node_modules\mammoth\lib\document-to-html.js:71:13)
at eval (D:\xxxx\WorkingFolder\xxxx\public\node_modules\mammoth\lib\document-to-html.js:64:20)
at iterate (D:\xxx\WorkingFolder\xxx_Live\public\node_modules\mammoth\node_modules\async\lib\async.js:134:13)
at Object.async.eachSeries (D:\xxx\WorkingFolder\xxx_Live\public\node_modules\mammoth\node_modules\async\lib\async.js:150:9)
at convertElements (D:\xxx\WorkingFolder\xxx_Live\public\node_modules\mammoth\lib\document-to-html.js:63:15)
at convertRun (D:\xxxx\WorkingFolder\xxx_Live\public\node_modules\mammoth\lib\document-to-html.js:122:9)
at elementToHtml (D:\xxx\WorkingFolder\xxx_Live\public\node_modules\mammoth\lib\document-to-html.js:71:13)
at eval (D:\xxxx\WorkingFolder\xxx_Live\public\node_modules\mammoth\lib\document-to-html.js:64:20)
Solution: Actually this is not node.js error but mammoth(see the above error log). While converting doc to epub, style is not converting. That is there was no proper valid document. I check and remove that pages. Now it is working fine.