[Vuejs]-Router-view not listing component

0👍

You are getting the error because you are importing Foo inside App.vue, but you are not using it there. Simply remove that import and the error will go away.

0👍

The answer is to change the app.vue code as below. not easy as a newby:-(

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

<script>

export default {
  name: 'app'
}
</script>

Leave a comment