Skip to content

RangeError: Maximum call stack size exceeded #20

Description

@mikefonted

Hi,

It seems I'm having an issue related to al older version of mammoth.js library.

When I try:
gitbook-convert manual.docx

I get the following error:

/usr/local/lib/node_modules/gitbook-convert/node_modules/mammoth/lib/html/ast.js:64
    return _.flatten((elements || []).map(function(element) {
                                                  ^

RangeError: Maximum call stack size exceeded
    at /usr/local/lib/node_modules/gitbook-convert/node_modules/mammoth/lib/html/ast.js:64:51
    at Array.map (native)
    at collapseFragments (/usr/local/lib/node_modules/gitbook-convert/node_modules/mammoth/lib/html/ast.js:64:39)
    at elementWithTag (/usr/local/lib/node_modules/gitbook-convert/node_modules/mammoth/lib/html/ast.js:29:19)
    at Object.freshElement (/usr/local/lib/node_modules/gitbook-convert/node_modules/mammoth/lib/html/ast.js:20:12)
    at bookmarkStart (/usr/local/lib/node_modules/gitbook-convert/node_modules/mammoth/lib/document-to-html.js:250:33)
    at elementToHtml (/usr/local/lib/node_modules/gitbook-convert/node_modules/mammoth/lib/document-to-html.js:68:13)
    at /usr/local/lib/node_modules/gitbook-convert/node_modules/mammoth/lib/document-to-html.js:61:20
    at /usr/local/lib/node_modules/gitbook-convert/node_modules/mammoth/node_modules/async/lib/async.js:227:13
    at iterate (/usr/local/lib/node_modules/gitbook-convert/node_modules/mammoth/node_modules/async/lib/async.js:134:13)

After checking mammoth.js repository issues, I found this, that seems the same problem I'm having and it was resolved by the 1.0.4 release: Paragraph with many child runs causes stack overflow

Then, I checked the gitbook-convert/package.json and found that the dependency is:
"mammoth": "^0.3.29",

That being said, is there any plan to update mammoth.js dependency?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions