[Vuejs]-VueJS Failed to mount component

0đź‘Ť

Your vue script defines your element as having the id “app”:

  el: "#app",

But there is no such element in your template.

<template>
   <div>
     <router-view></router-view>
   </div>
</template>

You should give the div an id of “app”, so that your view script knows what to target:

<template>
   <div id="app">
     <router-view></router-view>
   </div>
</template>

Leave a comment