codesandboxer icon indicating copy to clipboard operation
codesandboxer copied to clipboard

Repeated usage of `assembleFiles` API eventually causes `tooManyModules`

Open bengotow opened this issue 6 years ago • 1 comments

We're using codesandboxer within docz and it runs assembleFiles over and over in a single Node process. There's a global counter in loadFiles that increments each time it's run, and after you invoke it 120 times it starts throwing { key: 'tooManyModules' }.

I think it makes sense to check that a single sandbox doesn't contain too many modules, but the count variable should probably be passed as an argument and incremented as loadFiles is called recursively so that the counter isn't global?

bengotow avatar Mar 30 '19 19:03 bengotow

This sounds absolutely correct, this shouldn't be a global.

Noviny avatar Mar 31 '19 13:03 Noviny