hungnguyen1501
hungnguyen1501
NNuxt
Created by hungnguyen1501 on 10/31/2024 in #❓・help
Why i use installModule nuxtjs/i18n in nuxt module cannot working when use 2 more modules
https://github.com/nuxt-modules/i18n/issues/3193 --- Environment Details - Operating System: Darwin
- Node Version: v22.0.0
- Nuxt Version: 3.13.2
- CLI Version: 3.15.0
- Nitro Version: 2.9.7
- Package Manager: [email protected]
- Modules & Configurations: - Runtime Modules:
@nuxtjs/[email protected] - Build Modules: None specified. --- Steps to Reproduce Access the reproduction environment on Stackblitz: Stackblitz Project Bug Description While configuring nuxtjs/i18n in module.ts as per the official documentation, I used the following setup:
await installModule('@nuxtjs/i18n', {
langDir: resolve('./lang'),
locales: [
{ code: 'en', file: resolve('./lang/en.json') },
{ code: 'fr', file: resolve('./lang/fr.json') },
]
});
await installModule('@nuxtjs/i18n', {
langDir: resolve('./lang'),
locales: [
{ code: 'en', file: resolve('./lang/en.json') },
{ code: 'fr', file: resolve('./lang/fr.json') },
]
});
In nuxt.config.ts, when specifying the modules like this:
modules: [
'module-1', // working
'@nuxtjs/i18n'
]
modules: [
'module-1', // working
'@nuxtjs/i18n'
]
it works as expected. However, when arranging the modules in other combinations, the functionality breaks as shown below: - Configuration 1:
modules: [
'module-1', // working
'module-2', // not working
'@nuxtjs/i18n'
]

modules: [
'module-1', // working
'module-2', // not working
'@nuxtjs/i18n'
]

- Configuration 2:
modules: [
'module-2', // working
'module-1', // not working
'@nuxtjs/i18n'
]

modules: [
'module-2', // working
'module-1', // not working
'@nuxtjs/i18n'
]

Additional Context I am looking for guidance on achieving the intended configuration or an alternative solution.
5 replies
NNuxt
Created by hungnguyen1501 on 2/26/2024 in #❓・help
use #imports pinia in vitest
No description
2 replies