Subscribe on changes!

Invalid vnode type when creating vnode: undefined.

avatar
Aug 28th 2021

Version

3.2.6

Reproduction link

github.com/HomyeeKing/hombok

code :

// App.vue

<script setup lang="ts">
import Card from '@/components/Card.vue'
</script>

<template>
  <Card />
</template>


//  Card.vue

<script lang='ts' setup>

</script>

<template>
    <div class="border-solid">
       card
    </div>
</template>


image

Steps to reproduce

clone the repo

  • yarn && yarn dev

What is expected?

no warning and comp works fine

What is actually happening?

there's a warning in console

avatar
Aug 28th 2021

There's no Card component in your repository. My guess is you're incorrectly importing Card component, maybe you have a misconfigured @ alias. Add console.log(Card) to see if it's exported component or undefined

reproduction

maybe vue should provide better warning?

avatar
Aug 28th 2021

yes I forget to register alias in vite.config.js, that's all