N
Nuxtβ€’4w ago
Valentin

IntelliJ IDE not recognizing auto-imports unlike VSCode

Hey everyone! πŸ‘‹ I'm facing an issue with IntelliJ where the auto-imported i18n functions (like $t) aren't being recognized, while they work perfectly fine in VSCode. Setup: - Nuxt 3 (compatibilityVersion 4) - @nuxtjs/i18n - IntelliJ IDEA I've already checked: - TypeScript is up to date (^5.7.2) - Nuxt plugin is installed - .nuxt folder is marked as Sources Root Any suggestions on how to get proper type recognition for these auto-imports in IntelliJ? Thanks in advance!
2 Replies
kapa.ai
kapa.aiβ€’4w ago
Hi @Valentin. 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 information provided in the knowledge sources, it appears that you're encountering a known issue with JetBrains IDEs (including IntelliJ IDEA) related to recognizing auto-imports in Nuxt 3 projects. This issue specifically affects custom global properties added by augmenting Vue. The problem you're experiencing is likely due to a bug in JetBrains IDEs, as mentioned in a Stack Overflow answer: Stack Overflow: Custom plugin in nuxt 3 has unknown type (https://stackoverflow.com/questions/78484042) The answer states: "UPDATE: Turns out that there is a bug in jetbrains IDEs (Phpstorm, webstorm). Tried opening same repo in vscode, plugins are typed OK" There's also a link to the JetBrains issue tracker for this specific problem: JetBrains YouTrack: Vue custom global properties added by augmenting vue are not resolved (https://youtrack.jetbrains.com/issue/WEB-59818/Vue-custom-global-properties-added-by-augmenting-vue-are-not-resolved) Unfortunately, I don't have enough information about a specific fix or workaround for this issue in IntelliJ IDEA. The problem seems to be on the IDE's side rather than your project configuration. As a temporary solution, you might consider: 1. Using VSCode for development until the issue is resolved in JetBrains IDEs. 2. Manually importing the functions you need in each file where you use them, even though this goes against the auto-import feature of Nuxt 3. Keep an eye on the JetBrains issue tracker for updates on this problem. You may also want to ensure you're using the latest version of the Nuxt plugin for IntelliJ, as future updates might address this issue. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.aiβ€’4w ago
<@96601414653976576> 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