A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vuejs/vue-next/issues/3560 below:

Cannot have v-if and Async component together · Issue #3560 · vuejs/core · GitHub

Version

3.0.11

Reproduction link

https://github.com/stardustxx/vite-ssr-issue

Steps to reproduce

yarn && yarn dev to see it in your browser
You may see text like App and Async component but will see error in the console

Particularly the following code in App.vue

<template>
  <h1 v-if="mounted">App</h1>

  <Async />
</template>

Async is a component defined by defineAsyncComponent
If you move the h1 to be below Async, h1 will not be rendered due to the error. Removing the h1 or the v-if condition solves the problem

What is expected?

No warning or errors reported and components are rendered correctly

What is actually happening?

Encountered error like the following and stops the rendering

Uncaught (in promise) TypeError: Cannot read property 'emitsOptions' of null
    at shouldUpdateComponent (runtime-core.esm-bundler.js:1041)
    at updateComponent (runtime-core.esm-bundler.js:4230)

Please let me know if it's a vite issue then I can post it there, thank you

wederribas, arrian, hanxu2050, zigomir, jok311 and 1 more


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4