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.

Error in nextTick: "RangeError: Maximum call stack size exceeded"

See original GitHub issue

Expected Behavior

Followed your example exactly, and expected to see an example chart.

Actual Behavior

get a blank page and the error message: Error in nextTick: "RangeError: Maximum call stack size exceeded"

This happens whether I route to the component alone, or try to include it in a parent vue. I notice that when installing via npm, there is an unmet peer dependency of vue 2.4.2 (I have 2.3.4 for compatibility reasons with quasar), but even upgrading vue to that version results in the same error.

Environment

  • vue.js version: 2.3.4 (also tried with 2.4.2)
  • vue-chart.js version: 2.8.2
  • npm version: 4.2.0
  • quasar version: 0.14.0

Code

Here is the exact code of my Barchar.vue file:

<template>
<bar-chart></bar-chart>
</template>
<script>
import {Bar} from 'vue-chartjs'

export default Bar.extend({
  name: 'BarChart',
  components: {
    Bar
  },
  data () {
    return {
      datacollection: {
        labels: ['January', 'February'],
        datasets: [
          {
            label: 'Data One',
            backgroundColor: '#f87979',
            data: [40, 20]
          }
        ]
      }
    }
  },
  mounted () {
    console.log(this.datacollection)
    this.renderChart(this.datacollection, {responsive: true, maintainAspectRatio: false})
  }
})
</script>

<style>
</style>

Also tried multiple variations of component export or not components: { 'bar-chart': Bar }, components: { Bar }, naming or not name: BarChart etc, with no difference to blank page except that the error would change to Error in mounted hook: "TypeError: Cannot read property 'getContext' of undefined"

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
ssuesscommented, Aug 15, 2017

Btw, I think this is a CRITICAL thing to mention in the docs, I spent a long time trying to figure it out.

0reactions
phanchanracommented, Jul 23, 2020

The same problem, Even if I delete the template, an error will still occur. TypeError: Cannot read property ‘getContext’ of undefined

Read more comments on GitHub >

github_iconTop 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 >
[Vue warn]: Error in nextTick: "RangeError: Maximum call stack ...
I am now getting that error on a different place. The issue is with Vue's Next Tick function and _traverse function. As the...
Read more >
Error in nextTick - Maximum call stack size exceeded - Laracasts
If you don't know the error or where to look the best approach is to remove parts of your code and see if...
Read more >
RangeError: Maximum call stack size exceeded - Educative.io
The most common source for this error is infinite recursion. You must have a recursive function in your code whose base case is...
Read more >
Uncaught RangeError: Maximum call ... - Net-Informations.Com
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