Skip to content

"RangeError: Maximum call stack size exceeded" after crawling #133

@controversial

Description

@controversial

Filing this issue as #87 doesn't seem to have a resolution.

On our site, we use react-snapshot to save snapshots of 524 routes and generate a sitemap. In the react-snapshot output, we see the following:

Screen Shot 2020-07-21 at 10 36 00 PM

This error occurs after the entire site tree is crawled (all routes of our site are logged to the console with “Saving”).

Last month we encountered this same issue, and found that the solution was to make the following change to our nesting pattern:

Before
  • /a1/b1, /a1/b2, /a1/b3
  • /a2/b1, /a2/b2, /a2/b3
    ...
  • /a50/b1, /a50/b2, /a50/b3
After
  • /b1/a1, /b1/a2, ... /b1/a50
  • /b2/a1, /b2/a2, ... /b2/a50
  • /b3/a1, /b3/a2, ... /b3/a50
that is, we changed our route structure from “many routes, each containing a few routes” to “a few routes, each containing many routes.”

Although that approach worked before, now that we have more routes in our app, we can no longer avoid the error this way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions