Runtime module mismatch version of installed npm package
Opened this issue · 4 comments
Environment
- Operating System:
Darwin
- Node Version:
v18.16.0
- Nuxt Version:
3.6.2
- Nitro Version:
2.5.2
- Package Manager:
npm@9.7.1
- Builder:
vite
- User Config:
devtools
,modules
- Runtime Modules:
@nuxtjs/i18n@7.3.1
- 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.ts
modules definition (otherwise I couldn't even runnpm install
without 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/devtools@0.6.7
├── @nuxtjs/i18n@8.0.0-beta.13
├── @types/node@18.16.19
└── nuxt@3.6.2
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 npm@9.2.0 and other with yarn@1.22.19. 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: npm@9.2.0
- Builder: vite
- User Config: ssr, preset, app, css, runtimeConfig, modules, vueuse, elementPlus, i18n
- Runtime Modules: @nuxtjs/i18n@8.0.0-rc.3, @vueuse/nuxt@9.13.0, @element-plus/nuxt@1.0.4
- Build Modules: -
=========================================
=========================================
- Operating System: Windows_NT
- Node Version: v16.17.1
- Nuxt Version: 3.6.5
- Nitro Version: 2.5.2
- Package Manager: yarn@1.22.19
- Builder: vite
- User Config: ssr, build, devServer, modules, plugins, runtimeConfig, css, proxy, strapi, i18n, vite, experimental
- Runtime Modules: @nuxtjs/i18n@7.3.1, @pinia/nuxt@0.4.11, @vueuse/nuxt@10.3.0, @nuxt-alt/proxy@2.3.0, nuxt-swiper@1.2.0, @nuxtjs/strapi@1.9.3
- 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 nuxt-modules/i18n#2424 (comment)