Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Vue3] Error: Cannot read property '_c' of undefined #93

Open
klyakh opened this issue Nov 1, 2020 · 2 comments
Open

[Vue3] Error: Cannot read property '_c' of undefined #93

klyakh opened this issue Nov 1, 2020 · 2 comments

Comments

@klyakh
Copy link

klyakh commented Nov 1, 2020

Tried to use vue-google-charts with Vue3. It gives a bunch of warnings and then the error:

[Vue warn]: `beforeDestroy` has been renamed to `beforeUnmount`. 
[Vue warn]: Property "$createElement" was accessed during render but is not defined on instance.
[Vue warn]: Property "_self" was accessed during render but is not defined on instance.
[Vue warn]: Unhandled error during execution of render function
[Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/vue-next 
Uncaught (in promise) TypeError: Cannot read property '_c' of undefined
    at Proxy.render (vue-google-charts.common.js?757f:formatted:350)
    at renderComponentRoot (runtime-core.esm-bundler.js?5c40:696)
    at componentEffect (runtime-core.esm-bundler.js?5c40:4035)
    at reactiveEffect (reactivity.esm-bundler.js?a1e9:42)
    at effect (reactivity.esm-bundler.js?a1e9:17)
    at setupRenderEffect (runtime-core.esm-bundler.js?5c40:4018)
    at mountComponent (runtime-core.esm-bundler.js?5c40:3976)
    at processComponent (runtime-core.esm-bundler.js?5c40:3936)
    at patch (runtime-core.esm-bundler.js?5c40:3547)
    at mountChildren (runtime-core.esm-bundler.js?5c40:3736)

Here is simple example - https://codesandbox.io/s/error-vue-google-charts-vue3-qc1ek?file=/src/App.vue

@sandipkpatel
Copy link

sandipkpatel commented Nov 29, 2020

In dist/vue-google-charts.common.js file i changed render function to work on both v2 and v3.

render: function () { var _vm = this; if("_self" in _vm || "$createElement" in _vm){ var _h = _vm.$createElement; return (_vm._self._c || _h)("div", { ref: "chart" }); }else{ const {h} = require('vue'); return h('div',{ ref: "chart" }); } }

Hopefully this will helps.

@rvenancio2
Copy link

any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants