Vue js 2- Failed to mount component: template or render function not defined Vue js 2- Failed to mount component: template or render function not defined vue.js vue.js

Vue js 2- Failed to mount component: template or render function not defined


You can not select body tag as the main element you need to create a div for your vue instance. You need to create vue instance like this;

const app = new Vue({  el: '#app',  data: {    // Some data...  },  methods: {    // Your methods...  }})

And your html file should look like this;

...<body>  <div id="app">    <!-- Vue instance selects and creates components in this div -->  </div></body>


Ref: vue-masked-input, shows closing with />

<div><masked-input v-model="date" mask="11 / 11 / 1111" placeholder="Date" /></div>

but you don't have the self-close slash, or a closing tag...

<div><masked-input v-model="date" mask="11 / 11 / 1111" placeholder="Date"></div>