styledocco icon indicating copy to clipboard operation
styledocco copied to clipboard

error when processing multiple sub directories

Open pjkix opened this issue 12 years ago • 3 comments

i'm not sure if there is a limit on depth or the number of sub folders but when processing a directory structure such as the following i get an error.

  • less/
    • base/
      • (less files)
    • components/
      • sub-components/
        • (less files)
    • pages/
      • (less files)
    • readme.md

child_process.js:794
    throw errnoException(errno, 'spawn');
          ^
Error: spawn EMFILE
    at errnoException (child_process.js:847:11)
    at ChildProcess.spawn (child_process.js:794:11)
    at exports.spawn (child_process.js:618:9)
    at Object.exports.execFile (child_process.js:510:15)
    at exports.exec (child_process.js:481:18)
    at preprocess (/opt/local/lib/node_modules/styledocco/cli.js:110:5)
    at Object.async.apply [as css] (/opt/local/lib/node_modules/styledocco/node_modules/async/lib/async.js:532:23)
    at async.parallel (/opt/local/lib/node_modules/styledocco/node_modules/async/lib/async.js:467:25)
    at async.forEach (/opt/local/lib/node_modules/styledocco/node_modules/async/lib/async.js:86:13)
    at Array.forEach (native)

if i try and run styledocco on the folders separately it works fine, but when running the whole group it throws an error.

I would really like have all the docs generated at once

pjkix avatar Sep 27 '12 20:09 pjkix

after some googling this seems to be caused by the os x ulimit on open files. I was able to avoid the error by setting the following ...

 $ ulimit -n 1024

pjkix avatar Sep 27 '12 22:09 pjkix

Ok, I should be able to fix this by setting a limit of how many files to process at once. Thanks for your report, I'll notify you when it's fixed

jacobrask avatar Sep 28 '12 09:09 jacobrask

Aparently 256 is the default max number of files that can be opened at once.

marrs avatar Jun 27 '13 22:06 marrs