form-actions-nuxt icon indicating copy to clipboard operation
form-actions-nuxt copied to clipboard

Bug: vue-tsc error when type-checking is enabled at build time

Open mujahidfa opened this issue 6 months ago • 0 comments

Environment

Working directory: /home/mujahidfa/form-actions-nuxt-vue-tsc-build-error
Nuxt project info:


  • Operating System: Linux
  • Node Version: v18.18.0
  • Nuxt Version: 3.8.2
  • CLI Version: 3.10.0
  • Nitro Version: 2.8.1
  • Package Manager: [email protected]
  • Builder: -
  • User Config: modules, typescript
  • Runtime Modules: @hebilicious/[email protected]
  • Build Modules: -

Reproduction

https://github.com/mujahidfa/form-actions-nuxt-vue-tsc-build-error

Describe the bug

ERROR(vue-tsc) ';' expected. and ERROR(vue-tsc) Expression expected. in .nuxt/types/loader-types.d.ts.

To reproduce this error, install the following packages in a fresh Nuxt project:

npm install -D vue-tsc typescript
npm install @hebilicious/form-actions-nuxt

enable type-checking at build time:

// In nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@hebilicious/form-actions-nuxt'],
  typescript: {
    // Enable type-checking at build time
    typeCheck: true,
  },
});

and run npm run dev. The following error surfaces:

 ERROR                                                                                                      5:13:40 PM
 ERROR(vue-tsc)  ';' expected.
 FILE  /home/mujahidfa/form-actions-nuxt-vue-tsc-build-error/.nuxt/types/loader-types.d.ts:18:16

    16 |           type LoaderUrl = 
    17 |
  > 18 |           type LoaderName = 
       |                ^^^^^^^^^^
    19 |
    20 |           
    21 |

 ERROR(vue-tsc)  Expression expected.
 FILE  /home/mujahidfa/form-actions-nuxt-vue-tsc-build-error/.nuxt/types/loader-types.d.ts:22:11

    20 |           
    21 |
  > 22 |           export interface Loaders {
       |           ^^^^^^
    23 |             
    24 |           }
    25 |

[vue-tsc] Found 2 errors. Watching for file changes.

Additional context

No response

Logs

No response

mujahidfa avatar Dec 20 '23 09:12 mujahidfa