[Vuejs]-Weird error when running a simple vue.js app

0๐Ÿ‘

โœ…

So, as usual, it was a silly mistake, I had a typo in the routes definitions,
I used components instead of component:

export const routes = [{
    path: '/',
   //should be component
    components: Home
}

0๐Ÿ‘

Iโ€™d probably move away from trying to use render on your Vue instance when testing.

You should have a root file like index.html which creates a container for your app and calls the App component:

#index.html
<div id="my-vue-app">
    <app></app>
</div>

Then edit main.js, replacing the way you initialise your Vue instance with the following:

new Vue({
  components: {
    App
  },
  router
}).$mount('#my-vue-app')

Leave a comment