title: Failed to mount component: template or render function not defined
body: <p>I'm trying to use <code>vue-router</code> to display routed components below my navbar component but I get an error specified in the title. </p>
  
  <p>Here is my code:</p>
  
  <h3>main.js</h3>
  
  <pre><code>import Vue from 'vue';
  import VueRouter from 'vue-router';
  
  import app from './app';
  
  
  Vue.use(VueRouter);
  
  
  const foo = {
    template: '&lt;div&gt;foo&lt;/div&gt;',
  };
  
  const bar = {
    template: '&lt;div&gt;bar&lt;/div&gt;',
  };
  
  const routes = [
    {
      path: '/',
      component: foo,
    },
    {
      path: '/bar',
      component: bar,
    },
  ];
  
  const router = new VueRouter({
    mode: 'history',
    routes,
  });
  
  /* eslint-disable no-new */
  new Vue({
    el: '#app',
    router,
    render: h =&gt; h(app),
  });
  </code></pre>
  
  <h3>app.vue</h3>
  
  <pre><code>&lt;template&gt;
    &lt;div id="app"&gt;
      &lt;fs-navbar/&gt;
      &lt;main&gt;
        &lt;router-view/&gt;
      &lt;/main&gt;
    &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;style scoped lang="scss"&gt;
  
  &lt;/style&gt;
  
  &lt;script&gt;
  import fsNavbar from './components/fs-navbar';
  
  export default {
    components: {
      fsNavbar,
    },
  };
  &lt;/script&gt;
  </code></pre>
  
  <h3>components/fs-navbar.vue</h3>
  
  <pre><code>&lt;template&gt;
    &lt;nav&gt;...&lt;/nav&gt;
  &lt;/template&gt;
  
  &lt;style scoped lang="scss"&gt;
  
  &lt;/style&gt;
  
  &lt;script&gt;
  import Vue from 'vue';
  
  export default Vue.component('fs-navbar', {
    // logic
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>This app causes an error: </p>
  
  <pre><code>vue.js?3de6:2574[Vue warn]: Failed to mount component: template or render function not defined. (found in component &lt;fs-navbar&gt;)
  </code></pre>
  
  <p>If I add <code>fs-navbar</code> template directly into <code>app.vue</code>'s template everything is working as intended. Without router app is working as well.</p>
  
  <p>I'm using <a href="https://github.com/vuejs/vue-cli" rel="nofollow">vue-cli</a> with <a href="https://github.com/vuejs-templates/webpack" rel="nofollow">this template</a>(vuejs2)</p>