RangeError if too many files in directory tree #921

kmdavis opened this Issue Jul 7, 2016 · 0 comments


None yet

2 participants

kmdavis commented Jul 7, 2016

If the number of (nested) files in a subfolder exceeds 64k, file.getFilteredFileList throws an error at https://github.com/requirejs/r.js/blob/master/build/jslib/node/file.js#L131

{ [Error: RangeError: Maximum call stack size exceeded]
  originalError: [RangeError: Maximum call stack size exceeded] }

We encountered this after adding several new libraries to node_modules, resulting in an attempt to push 140k dirFiles onto the files array.

@jrburke jrburke closed this in 1bc77e5 Jul 12, 2016
@jrburke jrburke added this to the 2.2.1 milestone Jul 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment