Closed openreplyuk closed 9 years ago
This is issue in upstream library "boutique.js" while processing more complex MSON (attributes) structures. It will be resolved by migrating to a new version of API Blueprint parser – Drafter, once it is ready. In the mean time you can increase the node app stack size.
@openreplyuk see this StackOverflow question on how to increase the node.js stack size. Then you can call Aglio using something like:
node --stack-size XXX /path/to/node_modules/aglio/bin/aglio.js -i infile.apib -o outfile.html
If installed globally, you can use the global symlink to run, e.g. node --stack-size XXX /usr/local/bin/aglio
or something along those lines.
Thanks. I struggled to set stack size globally but invoking aglio with an increased stack size for node did the job.
@openreplyuk the latest release of Aglio 2.2.0 uses Protagonist+Drafter instead of Boutique.js, so it should no longer run into this issue and you can remove any custom logic to set the stack size!
Same error with aglio 3.9.3
I got a blocking issue that does not allow me to generate html file from apib file.
After executing: $ aglio --theme-full-width -i cart.apib -o cart.html
I got the following error back:
RangeError: Maximum call stack size exceeded at /usr/local/lib/node_modules/aglio/node_modules/drafter/node_modules/boutique/lib/inspect.js:200:5 at Object.hasAnyMemberSections (/usr/local/lib/node_modules/aglio/node_modules/drafter/node_modules/boutique/lib/inspect.js:208:5) at isObject (/usr/local/lib/node_modules/aglio/node_modules/drafter/node_modules/boutique/lib/typeresolution.js:61:18) at resolveImplicitType (/usr/local/lib/node_modules/aglio/node_modules/drafter/node_modules/boutique/lib/typeresolution.js:75:11) at /usr/local/lib/node_modules/aglio/node_modules/drafter/node_modules/boutique/lib/typeresolution.js:126:14 at simplifyTypeSpecification (/usr/local/lib/node_modules/aglio/node_modules/drafter/node_modules/boutique/lib/typeresolution.js:41:12) at resolveType (/usr/local/lib/node_modules/aglio/node_modules/drafter/node_modules/boutique/lib/typeresolution.js:121:10) at handleElement (/usr/local/lib/node_modules/aglio/node_modules/drafter/node_modules/boutique/lib/formats/jsonschema-v4.js:533:10) at resolveProperty (/usr/local/lib/node_modules/aglio/node_modules/drafter/node_modules/boutique/lib/formats/jsonschema-v4.js:46:10) at /usr/local/lib/node_modules/aglio/node_modules/drafter/node_modules/boutique/lib/formats/jsonschema-v4.js:61:12
Can you please help me on this? It is a blocking issue. I guess you will need to look at the apib file that I can email you if you need it.
Thx.