cli icon indicating copy to clipboard operation
cli copied to clipboard

Runtime module mismatch version of installed npm package

Open LeonardoRick opened this issue 2 years ago • 4 comments

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:

  1. Clone the project and set node version to 18
  2. Comment "@nuxtjs/i18n" inside nuxt.config.ts modules definition (otherwise I couldn't even run npm install without an error)
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  devtools: { enabled: true },
  modules: [
    // "@nuxtjs/i18n"
  ]
})
  1. Run npm i
  2. Uncomment "@nuxtjs/i18n" insode nuxt.config.ts
  3. Run npx nuxi info
  4. 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?

LeonardoRick avatar Jul 09 '23 09:07 LeonardoRick

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: - =========================================

=========================================

IvanWala avatar Aug 21 '23 08:08 IvanWala

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.

LeonardoRick avatar Aug 21 '23 09:08 LeonardoRick

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)

LeonardoRick avatar Oct 02 '23 21:10 LeonardoRick

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

IvanWala avatar Oct 04 '23 08:10 IvanWala