Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
controversial opened this issue Jul 22, 2020 · 0 comments
Open

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

controversial opened this issue Jul 22, 2020 · 0 comments

Comments

@controversial
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant