-
Notifications
You must be signed in to change notification settings - Fork 433
Property "message" was accessed during render but is not defined on instance. - Vue 3 & TypeScript #451
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
@dannysmc95 I transferred this to the correct repository |
Thanks @posva |
Sorry to be a pain, but how I get the update once it's applied? As if I do: |
If you work with "setup" (Composition API), you must return, in an object, your data, properties and regular functions. Example: setup(){ |
Just to add to @llabati 's response: I had to put the opening bracket on the same line as the return. I had it on the next line, which did not work. (I respond to this closed issue because it's the first one I found while googling the issue.) |
I have the same problem working with the Option API and thus with the However, this bug does not occur if I precize name="component name" inside the decorator Options like that: @Options({
name: "MyComponent"
})
export default class MyComponent extends Vue { It's sadly a duplication... (version used: "vue-class-component": "8.0.0-beta.4",) |
The same problem with @nicolidin ... (verison used: 8.0.0-rc.1) |
Version
3.0.0-rc.11
Reproduction link
https://github.com/dannysmc95/vue3-issue1
Steps to reproduce
!! Please note I have added
vue-next
as Vue3 is NOT available on the bug reporter, this was created using @vue/cli using the Vue 3 Preview feature.What is expected?
There should be no error and the p tag should still display the text.
Unless I am doing something wrong, but I don't believe so, I have removed the access definitions (public, private, etc), and no change.
What is actually happening?
I am seeing an error relating to reactivity, and it breaks the page, stopping the p tag from showing and forcing me to refresh the page each time, which kind of defeats the point of HMR.
See error output:
runtime-core.esm-bundler.js?5c40:38 [Vue warn]: Property "message" was accessed during render but is not defined on instance.
at <Anonymous onVnodeUnmounted=fn ref=Ref< null > >
at
at
warn @ runtime-core.esm-bundler.js?5c40:38
get @ runtime-core.esm-bundler.js?5c40:5696
render @ Home.vue?bb51:3
renderComponentRoot @ runtime-core.esm-bundler.js?5c40:535
componentEffect @ runtime-core.esm-bundler.js?5c40:4286
reactiveEffect @ reactivity.esm-bundler.js?a1e9:42
effect @ reactivity.esm-bundler.js?a1e9:17
setupRenderEffect @ runtime-core.esm-bundler.js?5c40:4269
mountComponent @ runtime-core.esm-bundler.js?5c40:4227
processComponent @ runtime-core.esm-bundler.js?5c40:4183
patch @ runtime-core.esm-bundler.js?5c40:3788
componentEffect @ runtime-core.esm-bundler.js?5c40:4373
reactiveEffect @ reactivity.esm-bundler.js?a1e9:42
callWithErrorHandling @ runtime-core.esm-bundler.js?5c40:154
flushJobs @ runtime-core.esm-bundler.js?5c40:359
Promise.then (async)
queueFlush @ runtime-core.esm-bundler.js?5c40:259
queueCb @ runtime-core.esm-bundler.js?5c40:281
queuePostFlushCb @ runtime-core.esm-bundler.js?5c40:287
eval @ runtime-core.esm-bundler.js?5c40:473
reload @ runtime-core.esm-bundler.js?5c40:459
eval @ runtime-core.esm-bundler.js?5c40:499
eval @ VM1034 Home.vue:14
./src/views/Home.vue @ app.js:1057
webpack_require @ app.js:849
hotApplyInternal @ app.js:750
hotApply @ app.js:412
(anonymous) @ app.js:387
Promise.then (async)
hotUpdateDownloaded @ app.js:386
hotAddUpdateChunk @ app.js:362
webpackHotUpdateCallback @ app.js:58
(anonymous) @ app.28fcc07….hot-update.js:1
!! Please note I have added
vue-next
as Vue3 is NOT available on the bug reporter.The text was updated successfully, but these errors were encountered: