-
-
Notifications
You must be signed in to change notification settings - Fork 490
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
i18n breaks Nuxt Auto-Import functionality! #2483
Comments
Thank you for you reporting! Hmm, 🤔 Lines 297 to 315 in 8a33fec
I don't see why combining it with @danielroe |
I have no idea why combining both modules would break auto imports 😅 |
After trying the reproduction in stackblitz and locally, I can't reproduce the issue described. Uninstalling and removing Maybe I'm doing something wrong, can someone else confirm this issue is happening as described? |
Yeah to use the InstanceType, you have to uncomment the import in line 9 inside 'page.ts'. Then it will break locally. Mabe the Component needs to be imported another way? My problem is, that it fully works when i18n is not installed.. |
Ah I misread the instructions and didn't see the import on line 9 had to be uncommented as well! Hmmm, after playing around some more, I noticed that removing But after trying more things I noticed that it also works while keeping the Screen.Recording.2023-10-11.at.11.24.35.mov |
Would you be able to provide a reproduction? 🙏 More infoWhy do I need to provide a reproduction?Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making. What will happen?If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritise it based on its severity and how many people we think it might affect. If How can I create a reproduction?We have a couple of templates for starting with a minimal reproduction: 👉 Reproduction starter (v8 and higher) A public GitHub repository is also perfect. 👌 Please ensure that the reproduction is as minimal as possible. See more details in our guide. You might also find these other articles interesting and/or helpful: |
Hi guys, I have some videos to visualize the bug that is happening. After looking more into it, I've found out that the bug does not only happen inside a pinia store: i18n_added.mp4When i18n_removed.mp4Updated reproduction: Hope this helps with clarification @kazupon |
Hi all, I can confirm @Bombastickj reproduction, I have the same issue with my current project using nuxt i18n last version. All Vue components (from /components folder or coming from other plugins/modules) inside my template are reported as |
I also can confirm this issue |
This doesn't work for me at all. All the autocompletion just dies even inside the components folder. |
Hello, |
I'm still looking into what the exact source of this issue is, it's not that easy to debug unfortunately. I have been trying to find what is breaking the type inference by removing type imports inside By doing so I have been able to narrow it down to types provided by |
@BobbieGoede |
It seems like these lines are breaking the type inference https://github.com/intlify/vue-i18n-next/blob/master/packages/vue-i18n/src/vue.d.ts#L1232-L1239 |
Thank you so much @BobbieGoede! |
I haven't looked myself but in that case the issue is likely that it extends And also it should likely first |
The types provided by vue-i18n in npm will be combined with typescript-generated types and vue-extended types defined in |
#2490 (comment) This is related. Probably can be closed now if the issue is fixed |
Hi guys! Thank you guys so much!! @BobbieGoede @kazupon |
Environment
Nuxt project info:
Reproduction
https://stackblitz.com/edit/nuxt-starter-cmht5h?file=stores%2Fpage.ts
Describe the bug
The error occurs when using the pinia & i18n packages for nuxt 3. All auto-imports for components are lost, when importing a component inside a pinia store, to define a InstanceType. I've tested to remove the i18n package and all auto-imports were back to normal.
Additional context
Also checked that Volar (takeover) is active. Bug can be viewed easily when following small instructions inside /stores/page.ts
Logs
No response
The text was updated successfully, but these errors were encountered: