-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
Issue with installModule for nuxtjs/i18n Failing When Used with Multiple Nuxt Modules #3193
Comments
This is main issues I have with @danielroe is there any way to make |
Second module won't be called/merged since the first one will register that module. You should use |
You can also use layer + module registering i18n module options: i18n will merge them for you. |
I've previously tried your approach and was able to resolve the issue to some extent. However, without installing the @nuxtjs/i18n module, I'm still unable to resolve useI18n in #imports within src/runtime, which remains inconvenient 😅. This limitation also affects testing with Vitest, where useI18n isn’t recognized. I'm wondering if the @nuxtjs/i18n team might have a solution to address this issue in a way that also supports multi-module compatibility. |
What would probably work best for your use case is to use |
Environment Details
@primevue/[email protected], @nuxtjs/[email protected], @nuxtjs/[email protected], @wellcare/[email protected], @wellcare/[email protected], @wellcare/[email protected], @wellcare/[email protected], @wellcare/[email protected], @wellcare/[email protected], @wellcare/[email protected], @wellcare/[email protected], @wellcare/[email protected], @wellcare/[email protected], @wellcare/[email protected], @nuxt/test-utils/[email protected], @nuxtjs/[email protected], @pinia/[email protected], @vueuse/[email protected], @nuxt/[email protected], @zadigetvoltaire/[email protected], [email protected], [email protected], @nuxt/[email protected], @nuxtjs/[email protected]
Steps to Reproduce
Access the reproduction environment on Stackblitz: Stackblitz Project
Bug Description
While configuring
nuxtjs/i18n
inmodule.ts
as per the official documentation, I used the following setup:In
nuxt.config.ts
, when specifying the modules like this:it works as expected. However, when arranging the modules in other combinations, the functionality breaks as shown below:
Configuration 1:
Configuration 2:
Additional Context
I am looking for guidance on achieving the intended configuration or an alternative solution.
Logs
No logs generated in this scenario.
The text was updated successfully, but these errors were encountered: