Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript Compilation Errors in @nuxt/ui - vite - vue3 Components - Missing Type Declarations #1

Open
claranceliberi opened this issue Jan 10, 2025 · 1 comment
Labels

Comments

@claranceliberi
Copy link

claranceliberi commented Jan 10, 2025

Description

During the type-check process (nr type-check), multiple TypeScript errors were encountered in the @nuxt/ui components. The main categories of errors are: this issue have been highlighted on nuxt/ui#2560 too

1. Missing Module Declarations

Several imports cannot find their corresponding type declarations:

  • #build/app.config
  • #imports
  • #build/ui-image-component

This appears consistently across multiple components including Accordion, Alert, Avatar, and others.

2. Missing DOM Type Definitions

Multiple components are missing basic DOM type definitions:

  • MouseEvent
  • KeyboardEvent
  • HTMLElement
  • HTMLDivElement
  • HTMLInputElement
  • FocusEvent
  • PointerEvent

Steps to Reproduce

  1. Run nr type-check
  2. Observe the TypeScript compilation errors

Stack Trace:

                                      nr
✔ script to run › type-check
node_modules/@nuxt/ui/dist/runtime/components/Accordion.vue:5:24 - error TS2307: Cannot find module '#build/app.config' or its corresponding type declarations.

5 import _appConfig from '#build/app.config'
                         ~~~~~~~~~~~~~~~~~~~

node_modules/@nuxt/ui/dist/runtime/components/Accordion.vue:94:30 - error TS2307: Cannot find module '#imports' or its corresponding type declarations.

94 import { useAppConfig } from '#imports'
                                ~~~~~~~~~~

node_modules/@nuxt/ui/dist/runtime/components/Alert.vue:4:24 - error TS2307: Cannot find module '#build/app.config' or its corresponding type declarations.

4 import _appConfig from '#build/app.config'
                         ~~~~~~~~~~~~~~~~~~~

node_modules/@nuxt/ui/dist/runtime/components/Alert.vue:68:30 - error TS2307: Cannot find module '#imports' or its corresponding type declarations.

68 import { useAppConfig } from '#imports'
                                ~~~~~~~~~~

node_modules/@nuxt/ui/dist/runtime/components/Avatar.vue:6:24 - error TS2307: Cannot find module '#build/app.config' or its corresponding type declarations.

6 import _appConfig from '#build/app.config'
                         ~~~~~~~~~~~~~~~~~~~
etc...
@atinux
Copy link
Member

atinux commented Jan 13, 2025

At the moment this is not yet compatible with vue-tsc

@atinux atinux added the pending label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants