-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Property or method "toJSON" is not defined #333
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
Comments
Hey, sorry for the delay, I tried your demo on an empty index.html page and no errors appears. I guess it has been fixed recently. If not, add a new repro and I'll take a look 🙂 |
please try this demo: to-json-error |
Maybe you need to update your Vue version. Tell me if you manage to boil it down it in a codepen where I can look at the source code |
I'm having this issue too. See component linked to above. |
Same here when I have an array of VueComponents in my data object. Chrome 60 on windows 10. Here's the relevant part of the stack trace:
|
Any further insights on this 'toJSON' not defined on the instance warning? Like @Elevista, I'm not seeing this on Windows Chrome (nor IE11) but I am seeing it on Mac Chrome. I'm using Vue '2.5.13' and see the error either with or without the Vue dev tools installed. |
+1 for Mac Chrome |
1 similar comment
+1 for Mac Chrome |
Found out that chrome extension Kuker was the reason for this warning. |
thanks intermundos , it is really because of Kuker, i unstall it , now it is ok... |
TL;DR:

when we use
Vue.use
to add a plugin, which render a component instance(withVue.extend
), and the component $emit events with vue instance as payload. It cause vue warns.version:
vue(>2.0.0) vue-devtool(latest)
demo:
codepen
(can't reproduce the bug unless u copy the code, start a demo and open vue-devtool)
bug:
vue warns: Property or method "toJSON" is not defined
facts:
toJSON
attr when it meets object. specnot defined
attr or method during render indevelop mode
_init
function (which included _renderProxy) in Vue and Vue.extend(produce _Ctor)reason
_renderProxy
, JSON.stringify try to calltoJSON
, cause getHandler to warn._renderPorxy
is reached before circular reference.but, it's real confusing...
The text was updated successfully, but these errors were encountered: