You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our Quarto site, we wrote a large number of pages and included those pages in our sidebar. After some time, we noticed an error if we included too many pages in the sidebar:
ERROR: RangeError: Invalid string length
Stack trace:
at JSON.stringify (<anonymous>)
at buildJsYamlAnnotation (file:///Applications/quarto/bin/quarto.js:18213:10)
at readAnnotatedYamlFromMappedString (file:///Applications/quarto/bin/quarto.js:18096:16)
at readAndValidateYamlFromMappedString (file:///Applications/quarto/bin/quarto.js:18454:30)
at readAndValidateYamlFromFile (file:///Applications/quarto/bin/quarto.js:20495:50)
at file:///Applications/quarto/bin/quarto.js:20533:36
at Array.map (<anonymous>)
at includedMetadata (file:///Applications/quarto/bin/quarto.js:20530:55)
at file:///Applications/quarto/bin/quarto.js:73754:40
at async projectContext (file:///Applications/quarto/bin/quarto.js:73546:26)
If I delete enough text from random places, remove unnecessary keys, and delete all comments, it seems to have worked around the issue for now, but I'm positive this issue will occur again, as we're regularly adding more pages to our site.
The sample app I've attached below is a 2000-page site with a matching sidebar to illustrate the behavior.
Huh. I don't know that we'll be able to fix this, because the problem is apparently happening inside JSON.stringify, a function from Deno's standard library.
That call to stringify is not truly necessary - it's there to prevent an infinite loop that might arise from circular structures. But we really shouldn't be failing.
Bug description
In our Quarto site, we wrote a large number of pages and included those pages in our sidebar. After some time, we noticed an error if we included too many pages in the sidebar:
If I delete enough text from random places, remove unnecessary keys, and delete all comments, it seems to have worked around the issue for now, but I'm positive this issue will occur again, as we're regularly adding more pages to our site.
The sample app I've attached below is a 2000-page site with a matching sidebar to illustrate the behavior.
Steps to reproduce
quarto preview
Expected behavior
Quarto builds the site normally.
Actual behavior
An error is thrown.
Your environment
Quarto check output
The text was updated successfully, but these errors were encountered: