N
Nuxt17h ago
BenBot

Plugin Types are missing :(

Hey all, for some reason all my plugin types are coming back as unknown in both vscode and nvim. Not really sure what to do about it. A lot of the information surrounding volar and vue/language-server I find online seems out of date and changing my vscode typescript version to the workspace local one doesn't help either. Are there any other things I can try?
2 Replies
kapa.ai
kapa.ai17h ago
Hi @BenBot. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- This issue with plugin types coming back as unknown in Nuxt is a known problem that has been reported and discussed in the Nuxt community. Based on the provided knowledge sources, I can offer some insights and potential solutions: 1. IDE-specific issue: There's a reported bug in JetBrains IDEs (PhpStorm, WebStorm) where custom global properties added by augmenting Vue are not resolved correctly. If you're using one of these IDEs, this might be the cause of your problem. Stack Overflow Post (https://stackoverflow.com/questions/78484042) mentions that opening the same repo in VSCode resolves the issue, suggesting it might be IDE-specific. 2. TypeScript dependency: In some cases, having TypeScript installed as a dependency can cause this issue. As mentioned in a GitHub Issue (https://github.com/nuxt/nuxt/issues/24885), uninstalling TypeScript and vue-tsc temporarily fixed the problem for some users. However, this is not an ideal long-term solution. 3. Plugin type inference: There was a fix implemented in Nuxt to ignore plugins typed as any when inferring injections, which might help in some cases where plugins are not properly typed. This was addressed in GitHub Pull Request #25010 (https://github.com/nuxt/nuxt/pull/25010). 4. Volar and Vue Language Tools: Make sure you're using the latest versions of Volar and Vue language tools. Recent updates have improved compatibility and type inference. GitHub Pull Request #27922 (https://github.com/nuxt/nuxt/pull/27922) mentions updates to @vue/language-core and vue-tsc which might help with type-related issues. 5. TypeScript configuration: Ensure your TypeScript configuration is correct. You might want to check if you have a tsconfig.json file in your project root and that it extends from the Nuxt-generated TypeScript configuration. Given the complexity of this issue and the various factors that could be causing it, here are some steps you can try: 1. Update all your Nuxt-related dependencies to the latest versions. 2. If you're using JetBrains IDEs, try opening your project in VSCode to see if the issue persists. 3. Check your TypeScript configuration and make sure it's properly set up for Nuxt. 4. If the issue persists, you might want to create a minimal reproduction of the problem and open an issue on the Nuxt GitHub repository (https://github.com/nuxt/nuxt) for further assistance. Remember that the Nuxt ecosystem is rapidly evolving, and solutions to these types of issues are continually being developed and refined. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai17h ago
<@115210654012407817> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Want results from more Discord servers?
Add your server