title: Laravel 8 (Inertia js) - Getting Vue error 'app.js:30559 [Vue warn]: Error in created hook: "Error: Cannot find module...'
body: <p>I have setup a Laravel 8 installation that uses Jetstream (inertia js stack). All Jetstream provided views are working correctly.</p>
  <p><strong>The issue</strong> is when I create a new Route that renders a new Vue template, I get this error in my console:</p>
  <p><code>app.js:30559 [Vue warn]: Error in created hook: &quot;Error: Cannot find module './Test'&quot;</code></p>
  <p>My Route created in web.php</p>
  <pre><code>Route::get('/test', function() {
      return Inertia\Inertia::render('Test');
  });
  </code></pre>
  <p>The 'Test.vue' file is in the 'resources/js/Pages' directory.</p>
  <pre><code>&lt;template&gt;
              &lt;h2 class=&quot;font-semibold text-xl text-gray-800 leading-tight&quot;&gt;
                  Testing
              &lt;/h2&gt;
  &lt;/template&gt;
  </code></pre>
  <p>app.js</p>
  <pre><code>require('./bootstrap');
  
  import Vue from 'vue';
  
  import { InertiaApp } from '@inertiajs/inertia-vue';
  import { InertiaForm } from 'laravel-jetstream';
  import PortalVue from 'portal-vue';
  
  Vue.use(InertiaApp);
  Vue.use(InertiaForm);
  Vue.use(PortalVue);
  
  const app = document.getElementById('app');
  
  new Vue({
      render: (h) =&gt;
          h(InertiaApp, {
              props: {
                  initialPage: JSON.parse(app.dataset.page),
                  resolveComponent: (name) =&gt; require(`./Pages/${name}`).default,
              },
          }),
  }).$mount(app);
  </code></pre>
  <p>Any idea why the Test.vue template is not being found?</p>