Runtime module mismatch version of installed npm package
Environment
- Operating System:
Darwin - Node Version:
v18.16.0 - Nuxt Version:
3.6.2 - Nitro Version:
2.5.2 - Package Manager:
[email protected] - Builder:
vite - User Config:
devtools,modules - Runtime Modules:
@nuxtjs/[email protected] - Build Modules:
-
Reproduction
https://github.com/LeonardoRick/temp-nuxt-bug
Steps to reproduce:
- Clone the project and set node version to
18 - Comment
"@nuxtjs/i18n"insidenuxt.config.tsmodules definition (otherwise I couldn't even runnpm installwithout an error)
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
modules: [
// "@nuxtjs/i18n"
]
})
- Run
npm i - Uncomment
"@nuxtjs/i18n"insodenuxt.config.ts - Run
npx nuxi info - Run
npm ls
Describe the bug
npm ls
nuxt-app@ /Users/leonardorick/Documents/cre8tive/git/leonardorick/temp-nuxt-bug
├── @nuxt/[email protected]
├── @nuxtjs/[email protected]
├── @types/[email protected]
└── [email protected]
My npm ls shows the right version of @nuxtjs/i18n (8.0.0-beta.13) but nuxt seems to not recognize it properly since it's showing the wrong version on npx nuxi info (7.3.1)
This is causing my application to not being able to start.
I already tried running rm -rf node_modules package-lock.json && npx nuxi cleanup and as this thread implies, this seems not to be a i18n problem in this case.
Am I missing something?
I have too projects with @nuxtjs/i18n (8.0.0-rc-3), one with [email protected] and other with [email protected]. The npm project works ok but the yarn one no.
=========================================
- Operating System: Windows_NT
- Node Version: v16.17.1
- Nuxt Version: 3.2.3
- Nitro Version: 2.2.3
- Package Manager: [email protected]
- Builder: vite
- User Config: ssr, preset, app, css, runtimeConfig, modules, vueuse, elementPlus, i18n
- Runtime Modules: @nuxtjs/[email protected], @vueuse/[email protected], @element-plus/[email protected]
- Build Modules: - =========================================
=========================================
- Operating System: Windows_NT
- Node Version: v16.17.1
- Nuxt Version: 3.6.5
- Nitro Version: 2.5.2
- Package Manager: [email protected]
- Builder: vite
- User Config: ssr, build, devServer, modules, plugins, runtimeConfig, css, proxy, strapi, i18n, vite, experimental
- Runtime Modules: @nuxtjs/[email protected], @pinia/[email protected], @vueuse/[email protected], @nuxt-alt/[email protected], [email protected], @nuxtjs/[email protected]
- Build Modules: - =========================================
Any workaround would be really appreciated, I've tried a lot of things already without success. It's opened for a while for now and I'm not being able to use i18n on my project because of that.
hey @IvanWala did you managed to make it work? I'm not being able to use i18n because of this. (Can't find a way to make nuxt understand and use the right version)
Hi @LeonardoRick I just reinstall in clean mode all my dependencies included i18n ( 8.0.0-rc4 ) and nuxt (3.7.3),
Now my problem is different https://github.com/nuxt-modules/i18n/discussions/2424#discussion-5647881