Subscribe on changes!

_resolveDef function access props but it is undefined

avatar
Oct 17th 2022

Vue version

^3.2.40

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-bjiedl?file=src/App.vue

Steps to reproduce

  1. npm run dev
  2. check console, will receive error: Uncaught TypeError: Cannot read properties of undefined (reading 'dataV7a7a37b1') at resolve2 (vue.js?v=f51652de:7665:28)

I am not sure vue version is 3.2.37.. I console log the varible in debuuger

What is expected?

Webcomponent can success render.

What is actually happening?

In runtime-dom.esm-bundler.js _resolveDef function props is undefined.

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (12) x64 Intel(R) Core(TM) i5-10600KF CPU @ 4.10GHz
    Memory: 4.34 GB / 15.91 GB
  Binaries:
    Node: 16.13.1 - C:\Program Files\nodejs\node.EXE        
    Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 8.1.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (106.0.1370.42)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    vue: ^3.2.38 => 3.2.41

Any additional comments?

No response

avatar
Oct 17th 2022

I did a PR for that already months ago. Seems ro have been drowned out a bit. #6182

So this issue is a duplicate, but the original issue seems to have been closed by the author.

So we'll leave this one.

avatar
Oct 17th 2022

@defaude So how can I skip this question? I am stucked. 😂

avatar
Oct 17th 2022

i think a workaround was to define an empty props object in the component? Not sure, can't test right now

avatar
Oct 17th 2022

@LinusBorg Thanks. It works.

<script lang="ts" setup>
defineProps<{ somePatch: string }>();
</script>
avatar
Oct 17th 2022

Please don't close it, it's still so a bug 😅

avatar
Nov 1st 2022

Please don't close it, it's still so a bug 😅

I found this bug had been resolved and merged into master. I am a inexperienced programmer. I want to ask when vue will release a new version after pr is merged? I know it is not a important bug. Just want to learn the vue's release plan.

avatar
Nov 1st 2022

We will release a new version, sure. But we necessarily don't do so after every merged PR - often we have some accumulate and release them together in a patch release.

You can expect a release in the next couple of days I think