#"Maximum call stack size exceeded" error generating a 450K pages site.

7 messages · Page 1 of 1 (latest)

odd shadow
#

I have an static site with 452K pages. It is generating all pages properly, but at the end is throwing a Maximum call stack size exceeded error.
Here is how is ending:

17:34:20 ▶ src/pages/index.astro
17:34:20   └─ /index.html (+2ms)
17:34:20 ✓ Completed in 219.78s.

Maximum call stack size exceeded
  Stack trace:
    at getStatsFromBinding (node:internal/fs/utils:544:29)
    at removeEmptyDirs (file:///home/angelcc/projects/XXXXX/monorepo/frontend/node_modules/astro/dist/core/fs/index.js:8:11)
    at Array.map (<anonymous>)
    at file:///home/angelcc/projects/XXXXX/monorepo/frontend/node_modules/astro/dist/core/fs/index.js:13:7
    at removeEmptyDirs (file:///home/angelcc/projects/XXXXX/monorepo/frontend/node_modules/astro/dist/core/fs/index.js:11:11)

I had similar problem with the @astrojs/sitemap plugin, but now is disable.

Any idea how to resolve this problem?

Using "astro": "^4.15.1"

#

I testing with en MAX_CALL_STACK_SIZE="8102" environment variable, but it does not work.

odd shadow
#

The error is happening when the generated code is in ./dist If I move it to, for example, /tmp/dist all works again. It looks like a bug.

odd shadow
#

silence ....... 😦
Pretty sure it's a bug.

tropic forge
#

452K pages 😧, I'm just wondering, is this a news portal website?

crimson niche
#

Your build is only 220s? Damn. Mine is almost as long and I have 20 pages 😕

odd shadow
#

@tropic forge @crimson niche Sorry, wrong number. It is 149.743 pages. But yest, taking always between 250 and 300 seconds