title: 'laravel8 + vue3 Cannot read properties of undefined (reading 'component')'
body: <p><em><strong>'laravel8 + vue3</strong></em>
  <strong>error</strong> <code>Uncaught TypeError: Cannot read properties of undefined (reading 'component')</code></p>
  <p>how can this error be avoided ?</p>
  <p><strong>app.js</strong></p>
  <pre><code>window.Vue = require('vue').default;
  Vue.component('hello', require('./hello.vue').default);
  const app = new Vue({
      el: '#app'
  });
  </code></pre>
  <p><strong>welcome.blade.php</strong></p>
  <pre><code>&lt;body class=&quot;antialiased&quot;&gt;
      &lt;div class=&quot;relative flex items-top justify-center min-h-screen bg-gray-100 dark:bg-gray-900 sm:items-center py-4 sm:pt-0&quot;&gt;
          &lt;div id=&quot;app&quot;&gt;
              &lt;hello&gt;&lt;/hello&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;script src=&quot;{{mix('js/app.js')}}&quot;&gt;&lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  <p><strong>hello.vue</strong></p>
  <pre><code>&lt;template&gt;
      &lt;div&gt;
          Hello World!
      &lt;/div&gt;
  &lt;/template&gt;
  </code></pre>
  <p><strong>package.json</strong></p>
  <pre><code>&quot;devDependencies&quot;: {
      &quot;@vue/compiler-sfc&quot;: &quot;^3.2.11&quot;,
      &quot;axios&quot;: &quot;^0.21&quot;,
      &quot;laravel-mix&quot;: &quot;^6.0.6&quot;,
      &quot;lodash&quot;: &quot;^4.17.19&quot;,
      &quot;postcss&quot;: &quot;^8.1.14&quot;,
      &quot;vue&quot;: &quot;^3.2.11&quot;,
      &quot;vue-loader&quot;: &quot;^16.5.0&quot;
  }
  </code></pre>
  <p>this error appears in vue3</p>
  <p>tell me how to avoid it</p>