[Vue warn]: Error in nextTick: "RangeError: Maximum call stack size exceeded"
See original GitHub issueVersion
2.5.17
Reproduction link
https://jsfiddle.net/chrisvfritz/50wL7mdz/
Steps to reproduce
The error is at that function of vue.
/**
* Helper that recursively merges two data objects together.
*/
function mergeData (to, from) {
if (!from) { return to }
var key, toVal, fromVal;
var keys = Object.keys(from);
for (var i = 0; i < keys.length; i ) {
key = keys[i];
toVal = to[key];
fromVal = from[key];
if (!hasOwn(to, key)) {
set(to, key, fromVal);
} else if (isPlainObject(toVal) && isPlainObject(fromVal)) {
mergeData(toVal, fromVal);
}
}
What is expected?
It is kinda weird and I don’t know from where it comes from or why is happening. So I can’t provide a link on how to reproduce it.
What is actually happening?
Many times the app is working perfectly but few times, this error appears. And the app is broken.
Sorry for not providing a Link to minimal reproduction but I don’t even know from where this error comes from since it is not happening every time.
For more info the error is showing by using those components:
<template>
<div class="tasks-content">
<v-tabs class="tabs" grow hide-slider height="60px" v-model="active_tab">
<v-tab
centered
v-for="tab in tabs"
:key="tab.name"
:href="`#${tab.name}`"
v-model="active_tab"
>
{{ tab.name }}
</v-tab>
</v-tabs>
<v-tabs-items v-model="active_tab">
<v-tab-item v-for="tab of tabs" :key="tab.id" :value="tab.name">
<v-card flat>
<!--<component :tasks="tasks" :is="active_tab"></component>-->
</v-card>
</v-tab-item>
</v-tabs-items>
</div>
</template>
<script>
import MyTasks from './MyTasks.vue'
import AllTasks from './AllTasks.vue'
export default {
name: 'TasksContent',
components: {
MyTasks, AllTasks
},
props: {
tasks: Array
},
data: () => ({
active_tab: 'MyTasks',
tabs: [
{ id: 1, name: 'MyTasks' },
{ id: 2, name: 'AllTasks' },
]
}),
}
</script>
<style lang="scss" scoped>
.tasks-content {
}
</style>
<template>
<div class="my-tasks">
<div class="chips">
<v-chip small color="orange" text-color="white">
<v-avatar class="teal">14</v-avatar>
All
</v-chip>
<v-chip small color="orange" text-color="white">
<v-avatar class="teal">9</v-avatar>
Completed
</v-chip>
<v-chip small color="orange" text-color="white">
<v-avatar class="teal">3</v-avatar>
Pending
</v-chip>
<v-chip small color="orange" text-color="white">
<v-avatar class="teal">2</v-avatar>
Behind
</v-chip>
</div>
<div class="custom-table">
<div class="header">
<div class="col">Assignee</div>
<div class="col">Project</div>
<div class="col">Status</div>
</div>
<div class="body">
<div class="row" v-for="task in tasks" :key="tasks.id">
<div class="assignee-col">
<v-img :src="require('@/assets/temp/user.png')" height="40" width="40" />
</div>
<div class="project-col">
{{ task.description.length > 25 ? task.description.slice(0, 40) : task.description }}
</div>
<div class="status-col">
{{task.status}}
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'MyTasks',
props: {
tasks: {
type: Array,
default: () => []
}
}
}
</script>
<style lang="scss" scoped>
.my-tasks {
.chips {
padding: 20px 0;
}
.custom-table {
.header {
display: grid;
grid-template-columns: 1fr 3fr 1fr;
.col {
padding: 10px;
}
}
.body {
.row {
display: grid;
grid-template-columns: 1fr 3fr 1fr;
border-bottom: 1px solid gray;
grid-gap: 5px;
padding: 10px;
}
}
}
}
</style>
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:38 (8 by maintainers)
Top Results From Across the Web
Vue.js "Maximum call stack size exceeded" error. Passing ...
Nuxt users: I encountered this error when introducing a new component in a template. As a quick workaround, I wrapped the component with...
Read more >Why do i get 'Maximum call stack size exceeded' error?
I'm stuck with this error for trying remove todo with vuex ... index.vue?3524:41 Uncaught RangeError: Maximum call stack size exceeded at ...
Read more >JavaScript RangeError: Maximum Call Stack Size Exceeded
The JavaScript RangeError: Maximum call stack size exceeded is an error that occurs when there are too many function calls, or if a...
Read more >vue maximum call stack size exceeded - You.com | The AI ...
You're getting that error because you have two computed properties that reference each others' value. Whenever you do that, you create a cyclical...
Read more >“RangeError: Maximum call stack size exceeded” and Vuex
One of the reasons to see “RangeError: Maximum call stack size exceeded” error might be an incorrect implementation of a computed property, here...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
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
I figured out if you have a view component with a name “ComponentName” and imported a component with the same name attribute this will give you this error. Just remove the name attribute in the view component 😃
This solution didn’t work for me. 😕