OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Cannot find module './DataTable.vue' or its corresponding type declarations

  • Thread starter Thread starter Tallboy
  • Start date Start date
T

Tallboy

Guest
Im using Nuxt 3, mostly default settings.

My folder structure for a component:

Code:
...
├── components
│   ├── MainNav.vue
│   ├── PageHeader.vue
│   ├── data-table
│   │   ├── DataTable.vue
│   │   └── index.ts

My index.ts:

Code:
export { default as DataTable } from "./DataTable.vue";

I keep getting this vue-tsc error (below)... What am I doing that's dumb? After hours of searching I can only find very outdated Nuxt 2 answers.

I have tried a bunch of attempts at adding paths to my to no avail...

My nuxt.config.ts

Code:
  typescript: {
    strict: true,
    typeCheck: true,
  },

Code:
 ERROR                                                                                                                                                                            5:26:26 AM
 ERROR(vue-tsc)  Cannot find module './DataTable.vue' or its corresponding type declarations.
 FILE  .../components/data-table/index.ts:1:38

  > 1 | export { default as DataTable } from "./DataTable.vue";
      |                                      ^^^^^^^^^^^^^^^^^
    2 |

<p>Im using Nuxt 3, mostly default settings.</p>
<p>My folder structure for a component:</p>
<pre><code>...
├── components
│ ├── MainNav.vue
│ ├── PageHeader.vue
│ ├── data-table
│ │ ├── DataTable.vue
│ │ └── index.ts
</code></pre>
<p>My <code>index.ts</code>:</p>
<pre class="lang-js prettyprint-override"><code>export { default as DataTable } from "./DataTable.vue";
</code></pre>
<p>I keep getting this <code>vue-tsc</code> error (below)... What am I doing that's dumb? After hours of searching I can only find very outdated Nuxt 2 answers.</p>
<p>I have tried a bunch of attempts at adding paths to my to no avail...</p>
<p>My <code>nuxt.config.ts</code></p>
<pre><code> typescript: {
strict: true,
typeCheck: true,
},
</code></pre>
<pre><code> ERROR 5:26:26 AM
ERROR(vue-tsc) Cannot find module './DataTable.vue' or its corresponding type declarations.
FILE .../components/data-table/index.ts:1:38

> 1 | export { default as DataTable } from "./DataTable.vue";
| ^^^^^^^^^^^^^^^^^
2 |
</code></pre>
 

Latest posts

Online statistics

Members online
0
Guests online
2
Total visitors
2
Top