-
-
Notifications
You must be signed in to change notification settings - Fork 483
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/nuxt-module@4.1.1, @nuxtjs/tailwindcss@6.12.2, @nuxtjs/color-mode@3.5.2, @wellcare/nuxt3-module-data-layer@0.6.4, @wellcare/nuxt3-module-account@1.0.2, @wellcare/nuxt3-module-chart@1.0.18, @wellcare/nuxt3-module-form@0.8.0, @wellcare/nuxt3-module-consultation@0.1.3, @wellcare/nuxt3-module-conference@0.0.1-debug.22, @wellcare/nuxt3-module-notion@0.2.15, @wellcare/muot-ui@0.3.5, @wellcare/nuxt3-module-chat@0.0.55, @wellcare/nuxt3-module-media@0.0.3, @wellcare/nuxt3-module-phr@0.0.12, @nuxt/test-utils/module@3.14.4, @nuxtjs/google-fonts@3.2.0, @pinia/nuxt@0.5.5, @vueuse/nuxt@11.1.0, @nuxt/image@1.8.1, @zadigetvoltaire/nuxt-gtm@0.0.13, dayjs-nuxt@2.1.11, nuxt-jsonld@2.0.8, @nuxt/eslint@0.6.1, @nuxtjs/i18n@8.5.5
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: