Skip to content

RangeError if too many files in directory tree #921

Description

@kmdavis

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions