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

[Bug]: Adding i18n module to Nuxt breaks typing for all components in Nuxt app #2839

Closed
martinszeltins opened this issue Mar 14, 2024 · 3 comments · Fixed by primefaces/primevue#5419
Assignees

Comments

@martinszeltins
Copy link

Environment

Stackblitz

------------------------------
- Operating System: Linux
- Node Version:     v18.18.0
- Nuxt Version:     3.10.3
- CLI Version:      3.10.1
- Nitro Version:    -
- Package Manager:  [email protected]
- Builder:          -
- User Config:      extends
- Runtime Modules:  -
- Build Modules:    -
------------------------------

Reproduction

https://stackblitz.com/github/martinszeltins/found-nuxt-components-issue?file=app.vue

Describe the bug

When I add this module to my modules array in nuxt.config.ts then I lose all typings for my components (for both local and 3rd party components). It shows that components have type of unknown. Before I add this module, everything works.

nuxt.config.ts 👇️

modules: [
+  '@nuxtjs/i18n', // This breaks all auto-import component typings (components not recognized anymore)
   '@vueuse/nuxt',
   'nuxt-primevue'
],

If I remove it from my modules array then everything works again.

Screenshot before adding the module (everything works): 👍️ 👇️

image

Screenshot after adding the module (type unknown): ❌ 👇️

image

Additional context

No response

Logs

No response

@BobbieGoede
Copy link
Collaborator

Hmm, I'm pretty sure this is caused by the types provided by primevue. We ran into a similar issue some time ago, I'll see if I can open a PR to fix it on their end.

@BobbieGoede
Copy link
Collaborator

BobbieGoede commented Mar 15, 2024

As you have noticed, I opened a PR (primefaces/primevue#5419) on their repo to resolve your issue, since this isn't caused by this module I'll close this issue.

I recommend opening an issue on their repo and referencing the PR (and this issue), as their PR template seems to require it, this may not be necessary anymore since they've added the PR to the next milestone.

@martinszeltins
Copy link
Author

As you have noticed, I opened a PR (primefaces/primevue#5419) on their repo to resolve your issue, since this isn't caused by this module I'll close this issue.

I recommend opening an issue on their repo and referencing the PR (and this issue), as their PR template seems to require it, this may not be necessary anymore since they've added the PR to the next milestone.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants