Subscribe on changes!

Blank screen and Vue warning with hot reloading

avatar
Sep 22nd 2021

Version

3.2.13

Reproduction link

github.com

Steps to reproduce

  1. Clone attached repo and run npm install.
  2. Run npm run serve.
  3. Open the app in the browser. You should see a page that says "Hello World!".
  4. Open App.vue and save the file.
  5. Observe that the browser page is now blank and there is a warning in the console that says [Vue warn]: Component is missing template or render function. at <App>

What is expected?

I would expect the app to still show up and for there to be no warning.

What is actually happening?

The app disappears and there is a warning.


Other devs on the Vue forum are running into this issue: https://forum.vuejs.org/t/vue-3-fresh-project-hot-reload-resulting-in-component-is-missing-template-or-render-function/121884

avatar
Sep 22nd 2021

I got the same problem with the latest version.

avatar
Sep 22nd 2021

Same issue here...

avatar
Sep 22nd 2021

This is a regression caused by vue-loader@16.6+. For now, please pin vue-loader to 16.5.x (e.g. using Yarn's resolution field)

avatar
Sep 22nd 2021

Should be fixed in vue-loader@16.8.1.

avatar
Sep 23rd 2021

I am new to Vue, how would you pin vue-loader to 16.5.x ? I am using npm.

Thank you.

avatar
Sep 23rd 2021

应该固定在vue-loader@16.8.1. 我固定在vue-loader@16.8.1无效,还是报这警告,并且页面空白。这是我package-lock.json的截图: image 以及查看node_modules文件夹下安装的vue-loader的package.json截图: image

avatar
Sep 23rd 2021

When is a vue-loader version bump in @vue/cli-service expected @yyx990803 ? I'm afraid that there's no straightforward solution for npm as for yarn (except downgrading)

avatar
Sep 24th 2021

@epaezrubio you can always remove the lockfile and re-install to force latest version.

avatar
Sep 24th 2021

It's working again for me...

I reinstalled vue cli via npm install -g u/vue/cli then deleted my projects package-lock.json file. Then from the project, I ran npm install and the hot reload is working again.

avatar
Nov 27th 2021

Still an issue with a Vue CLI scaffolded project and vue-loader 16.8.2.

avatar
Nov 29th 2021

Still not solved,With the latest cli, or this problem @yyx990803

WechatIMG163 WechatIMG162
avatar
Dec 29th 2021

still blank screen when use vue-loader 16.8.1,and console warn Component is missing template or render function

avatar
Jan 4th 2022

I find that when making changes to components that have a v-if or v-show condition on them (for example a dropdown menu), and I make some changes to a nested component, this will hot-reload fine when the component is visible. But if I then toggle the visibility of the parent component to hide it and then show it again, Vue will render an empty component.

Only fix is to refresh the page.

Not sure if it is the same issue as the one described here, as there is no error in the console, but it's a similar problem and also requires a refresh to fix it.

avatar
May 2nd 2022

Should be fixed in vue-loader@16.8.1.

But, when I use vue-loader@17.0.0, it still warns.