question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"RangeError: Maximum call stack size exceeded" when stacking components with client scripts

See original GitHub issue

Description 📖

When you stack components with client scripts (client:idle / client:load) you get an RangeError: Maximum call stack size exceeded.

Reproduction 🐞

https://stackblitz.com/edit/iles-uiy2vm?file=src/components/ScriptOne.vue

~/projects/iles-uiy2vm
❯ yarn build
$ iles build
iles v0.7.34 vite v2.8.6
✔ building client + server bundles
  done in 1.1s

✔ resolving static paths
  done in 5ms

✔ rendering pages
  done in 11ms

⚠ Skipping sitemap. Configure `siteUrl` to enable sitemap generation.
✔ building islands bundle
  done in 475ms

✖ writing pages
build error:
 RangeError: Maximum call stack size exceeded
    at eval (/home/projects/iles-uiy2vm/node_modules/iles/dist/node/chunk-QFNLXJ42.js:75:5)
    at Array.flatMap (<anonymous>)
    at resolveManifestEntries (/home/projects/iles-uiy2vm/node_modules/iles/dist/node/chunk-QFNLXJ42.js:73:21)
    at eval (/home/projects/iles-uiy2vm/node_modules/iles/dist/node/chunk-QFNLXJ42.js:75:28)
    at Array.flatMap (<anonymous>)
    at resolveManifestEntries (/home/projects/iles-uiy2vm/node_modules/iles/dist/node/chunk-QFNLXJ42.js:73:21)
    at eval (/home/projects/iles-uiy2vm/node_modules/iles/dist/node/chunk-QFNLXJ42.js:75:28)
    at Array.flatMap (<anonymous>)
    at resolveManifestEntries (/home/projects/iles-uiy2vm/node_modules/iles/dist/node/chunk-QFNLXJ42.js:73:21)
    at eval (/home/projects/iles-uiy2vm/node_modules/iles/dist/node/chunk-QFNLXJ42.js:75:28)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
mseelecommented, Jul 20, 2022

Please share a real site/app/use case if you are interested in this type of usage.

@ElMassimo please look at https://github.com/mseele/sve-website/tree/c79c8d2a840d39ab0a573d76fd9b2c915af2894f for a real site use case.

This is where I ran into that error:

  - EventContent      - EventDetails (client:load)          - NewsSubscription              - EmailSubscription (client:load)

and

  - EventsContent      - NewsSubscription          - EmailSubscription (client:load)

In the current version I worked around by duplicate a little code, remove EmailSubscription and make NewsSubscription client:load or not.

1reaction
ouuancommented, Jul 20, 2022

Please share a real site/app/use case if you are interested in this type of usage.

I have been working on my new blog these days. It’s still a WIP and will hopefully be published this week.

In short, I want to display a few dynamic stats like relative creation/modification time and visitor count in the header of a blog post. And I also want to display the post header on the search result page. The post header is static on other pages but dynamic on the search result page. The bundle size is small so it’s not a big problem for me, though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Maximum call stack size exceeded error
It means that somewhere in your code, you are calling a function which in turn calls another function and so forth, until you...
Read more >
RangeError: Maximum call stack size exceeded - Educative.io
In this shot, we will see how to fix the “RangeError: Maximum call stack size exceeded” error. ... The most common source for...
Read more >
JavaScript RangeError: Maximum Call Stack Size Exceeded
The RangeError: Maximum call stack size exceeded is thrown when a function call is made that exceeds the call stack size. This can...
Read more >
How to fix a "RangeError: Maximum call stack size - ServiceNow
I'm getting a javascript error on a catalog item in service portal...the error is showing as "RangeError: Maximum call stack size exceeded".
Read more >
Uncaught RangeError: Maximum call stack size exceeded
This error is almost always means you have a problem with recursion in JavaScript code, as there isn't any other way in JavaScript...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found