"RangeError: Maximum call stack size exceeded" when stacking components with client scripts
See original GitHub issue- I have read the troubleshooting section before opening an issue.
- I have tried upgrading
iles
andvite
.
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:
- Created a year ago
- Comments:11 (10 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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 makeNewsSubscription
client:load or not.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.