Vue template or render function not defined yet I am using neither?

This is my main javascript file:

import Vue from 'vue'

new Vue({
  el: '#app'

My HTML file:

    <div id="app"></div>

    <script src="{{ mix('/js/app.js') }}"></script>

Webpack configuration of Vue.js with the runtime build:

alias: {
    'vue$': 'vue/dist/vue.runtime.common.js'

I am still getting this well known error:

[Vue warn]: Failed to mount component: template or render function not defined.
(found in root instance)

How come when I don’t even have a single thing inside my #app div where I mount Vue, I am still getting a render/template error? It says found in root but there is nothing to be found because it does not even have any content?

How am I suppose to mount if this does not work?


I have tried it like this which seems to work:

new Vue(App).$mount('#app');

It make sense because using the el property implies you are ‘scanning’ that dom element for any components and it’s useless because the runtime build does not have a compiler.

Still it is an extremely strange error message to throw, especially when I have my entire #app div emptied out.

Hopefully somebody could confirm my thoughts.

309 thoughts on “Vue template or render function not defined yet I am using neither?”

  1. Hey There. I found your blog using msn. This is a really well
    written article. I will be sure to bookmark it and return to
    read more of your useful information. Thanks for the post.
    I’ll definitely return.

  2. Pingback: priligy alcohol
  3. Pingback: iverm 6 mg uses
  4. I’m really impressed with your writing skills and also with the layout on your blog.
    Is this a paid theme or did you customize it yourself?
    Anyway keep up the nice quality writing, it is rare to see a nice blog like
    this one today.

  5. I’m really enjoying the theme/design of your site.
    Do you ever run into any browser compatibility problems? A few of my
    blog visitors have complained about my site not operating correctly in Explorer
    but looks great in Safari. Do you have any ideas to help fix this problem?

    scoliosis surgery scoliosis

  6. Pingback: stromectol for
  7. Pingback: men viagra
  8. Pingback: tadalafil goodrx
  9. Pingback: sildenafil pills
  10. Pingback: viagra or cialis
  11. Pingback: sildenafil 50 mg
  12. Pingback: amazon viagra
  13. Recognition you in the interest of making me a gleeful bride on my wedding broad daylight! I have every time had so-so lamina with recurrent breakouts here and there. 3 months before my big epoch my build artist told me I needed to do something close to my shell or she would compel ought to to thicken on the cover-up. I started using the Oxylift with the Seabuckthorn Berry Cream and WOW, what a inconsistency! My personality artist was wholly walking on air she was expert to suitable for unoppressive on the cover-up and commented on how my incrustation smoothed out. Give you again!

  14. Pingback: ic cephalexin
  15. Pingback: flagyl 400
  16. Pingback: azithromycin cost
  17. Pingback: flagyl dosages
  18. Pingback: ilosone
  19. Pingback: viagra
  20. Pingback: sildenafil citrate
  21. Pingback: revatio

Leave a Comment