gitbook-plugin-swagger icon indicating copy to clipboard operation
gitbook-plugin-swagger copied to clipboard

Problem parsing huge swagger-files

Open mmschettler opened this issue 8 years ago • 3 comments

The following error occurred while parsing a huge swagger-file with the latest versions of the gitbook-cli and the swagger plugin. The swagger file has no error or warnings.

$ gitbook build Live reload server started on port: 35729 Press CTRL+C to quit ...

info: 8 plugins are installed info: loading plugin "swagger"... OK info: loading plugin "livereload"... OK info: loading plugin "highlight"... OK info: loading plugin "search"... OK info: loading plugin "lunr"... OK info: loading plugin "sharing"... OK info: loading plugin "fontsettings"... OK info: loading plugin "theme-default"... OK info: found 9 pages info: found 52 asset files Loading bootprint-swagger 1.0.1 Loading bootprint-json-schema 1.1.0 Loading bootprint-base 1.1.0 Loading bootprint-swagger 1.0.1 Loading bootprint-json-schema 1.1.0 Loading bootprint-base 1.1.0 Loading bootprint-swagger 1.0.1 Loading bootprint-json-schema 1.1.0 Loading bootprint-base 1.1.0 D:\git\TAX\node_modules\q\q.js:155 throw e; ^

RangeError: Maximum call stack size exceeded at RegExp.exec (native) at D:\git\TAX\node_modules\gitbook-plugin-swagger\index.js:62:38 at _fulfilled (D:\git\TAX\node_modules\q\q.js:854:54) at self.promiseDispatch.done (D:\git\TAX\node_modules\q\q.js:883:30) at Promise.promise.promiseDispatch (D:\git\TAX\node_modules\q\q.js:816:13) at D:\git\TAX\node_modules\q\q.js:624:44 at runSingle (D:\git\TAX\node_modules\q\q.js:137:13) at flush (D:\git\TAX\node_modules\q\q.js:125:13) at _combinedTickCallback (internal/process/next_tick.js:73:7) at process._tickCallback (internal/process/next_tick.js:104:9)

mmschettler avatar May 16 '17 12:05 mmschettler

What version of Node are you running? There are some older versions that have a similar error. Might try to get the latest version running to verify that it isn't a bug in V8.

gnomeontherun avatar May 18 '17 13:05 gnomeontherun

I used the Node version 6.10.2 - not that old.

mmschettler avatar May 22 '17 08:05 mmschettler

No, does it work if you use a smaller swagger file?

gnomeontherun avatar May 24 '17 02:05 gnomeontherun