title: VueJS/Typescript - Cannot find module './components/Navigation' or its corresponding type declarations
body: <p>When I create a script as typescript (lang=&quot;ts&quot;) I get an error stating</p>
  <blockquote>
  <p>&quot;Cannot find module './components/Navigation' or its corresponding type declarations (Vetur 2307).&quot;.</p>
  </blockquote>
  <p>I realized that this only happens when I set the lang as ts, which is what I need to build my Vue application.</p>
  <p>app.vue</p>
  <pre><code>&lt;template&gt;
    &lt;Navigation /&gt;
  &lt;/template&gt;
  
  &lt;script lang=&quot;ts&quot;&gt;
  import Navigation from './components/Navigation'; // This is where I get the error message
  
  export default {
    name: 'app',
    components: {
      Navigation,
    }
  }
  &lt;/script&gt;
  </code></pre>
  <p>Navigation.vue</p>
  <pre><code>&lt;template&gt;
    &lt;div id=&quot;nav&quot;&gt;
      &lt;router-link to=&quot;/&quot;&gt;Home&lt;/router-link&gt; 
      &lt;router-link to=&quot;/about&quot;&gt;About&lt;/router-link&gt; 
      &lt;router-link to=&quot;/categories&quot;&gt;Categories&lt;/router-link&gt; 
      &lt;router-link to=&quot;/random&quot;&gt;Random&lt;/router-link&gt;
    &lt;/div&gt;
    &lt;router-view /&gt;
  &lt;/template&gt;
  
  &lt;script lang=&quot;ts&quot;&gt;
  export default {
    name: 'Navigation',
  }
  &lt;/script&gt;
  </code></pre>