I tried using https://www.npmjs.com/package/vue-c3 for rendering my c3 charts in vue. It worked some time ago, but now it started giving (in VueC3):
“vue.runtime.esm.js?ff9b:587 [Vue warn]: Failed to mount component: template or render function not defined.”
even when using a code from a tutorial:
JavaScript
x
24
24
1
<template>
2
<div>
3
<vue-c3 :handler="handler"></vue-c3>
4
</div>
5
</template>
6
7
<script>
8
import Vue from 'vue'
9
import VueC3 from 'vue-c3'
10
11
export default {
12
name: ,
13
components: {
14
VueC3
15
},
16
17
data () {
18
return {
19
handler: new Vue()
20
}
21
}
22
}
23
</script>
24
How can I fix this?
Advertisement
Answer
I faced the same exact problem. In my case it seems the bug was introduced after upgrading vue-c3 package to its latest version (v1.2.5 at the time of writing).
What I did was to temporarily stick to our previous version (v1.1.1) in package.json (until it is fixed):
{
"vue-c3": "1.1.1"
}
and worked again.