Type errors in Nuxt UI Pro
Hi, there are type errors in the library of NuxtUI pro in the node_modules and its affecting
nuxi typecheck
and my DX in general, by showing error messages while in development mode with npm run dev
. Adding skipLibCheck in nuxt.config.js or tsconfig.json or anywhere doesn't change anything.
I don't see anyone else having this issue, yet setting up a nuxt project from scratch and just including nuxt ui pro gives me the same errors without changing anything from the base configs.
Has anyone had this issue?2 Replies
Hi @dFuZer. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Based on the knowledge sources provided, I can offer some insights into your issue with type errors in Nuxt UI Pro.
First, it's important to note that Nuxt UI Pro is a premium extension of Nuxt UI, and it's designed to work with TypeScript. According to the Nuxt UI Pro installation guide, the library is written in TypeScript and provides typings for all its components and composables.
Regarding the type errors you're encountering, there are a few points to consider:
1. Nuxt 3 has strict TypeScript checks enabled by default. As mentioned in the Nuxt TypeScript documentation, these strict checks are enabled to provide greater type safety.
2. If you're converting an existing codebase to TypeScript or experiencing issues with strict checks, you can temporarily disable them. You can do this by setting
strict
to false
in your nuxt.config
file:
3. The skipLibCheck
option you mentioned is typically used to skip type checking of declaration files in the node_modules
folder. However, as you've noted, this doesn't seem to resolve your issue.
4. Nuxt generates its own TypeScript configuration file (.nuxt/tsconfig.json
) which includes recommended settings. Make sure you're extending this file in your project's tsconfig.json
as described in the Nuxt documentation.
5. For type-checking, Nuxt recommends using vue-tsc
. As mentioned in the Nuxt typecheck command documentation, you should install vue-tsc
and typescript
as development dependencies:
Then you can run type-checking with:
If you're still experiencing issues after trying these steps, it might be worth reaching out to the Nuxt UI Pro support team directly, as they would have more specific knowledge about potential type issues in their library.
Remember, Nuxt UI Pro is a premium product, and as a license holder, you should have access to their private GitHub repository and potentially direct support channels.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@282901700946165762> Kapa.ai is still learning and improving, please let me know how I did by reacting below.