Blank screen and Vue warning with hot reloading
Version
3.2.13
Reproduction link
Steps to reproduce
- Clone attached repo and run
npm install. - Run
npm run serve. - Open the app in the browser. You should see a page that says "Hello World!".
- Open
App.vueand save the file. - 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
I got the same problem with the latest version.
Same issue here...
This is a regression caused by [email protected]+. For now, please pin vue-loader to 16.5.x (e.g. using Yarn's resolution field)
Should be fixed in [email protected].
I am new to Vue, how would you pin vue-loader to 16.5.x ? I am using npm.
Thank you.
应该固定在
[email protected]. 我固定在[email protected]无效,还是报这警告,并且页面空白。这是我package-lock.json的截图:以及查看node_modules文件夹下安装的vue-loader的package.json截图:
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)
@long-hai-yang @Sun3 You can refer to this answer https://stackoverflow.com/questions/15806152/how-do-i-override-nested-npm-dependency-versions
@epaezrubio you can always remove the lockfile and re-install to force latest version.
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.
Still an issue with a Vue CLI scaffolded project and vue-loader 16.8.2.
Still not solved,With the latest cli, or this problem @yyx990803
still blank screen when use vue-loader 16.8.1,and console warn Component is missing template or render function
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.
以及查看node_modules文件夹下安装的vue-loader的package.json截图:
