i18n: Could not resolve module "@intlify/vue-router-bridge/lib/index.mjs" when using `npm`

Environment

with deps

"@nuxt/devtools": "latest",
"@nuxtjs/i18n": "npm:@nuxtjs/i18n-edge@^8.0.0-rc.5-28322235.b889e39",
"nuxt": "^3.8.1",
"vue": "^3.3.8",
"vue-router": "^4.2.5"

Reproduction

https://github.com/metkm/test

Describe the bug

Installing the module using npm and running will result in the following error

Could not resolve module "@intlify/vue-router-bridge/lib/index.mjs"

Users need to install @intlify/vue-router-bridge, @intlify/vue-i18n-bridge and vue-i18n-routing as dev dependencies to get around this issue. So workaround is to run: npm i -D @intlify/vue-router-bridge @intlify/vue-i18n-bridge vue-i18n-routing.

Additional context

Logs

No response

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Comments: 19

Most upvoted comments

Just merged #2583, can you check if you’re still experiencing this issue using the latest edge release? npm i -D @nuxtjs/i18n@npm:@nuxtjs/i18n-edge

Closing as the fixes are now released in https://github.com/nuxt-modules/i18n/releases/tag/v8.0.0-rc.7!

If you’re running into this with rc.7, try deleting node_modules and lockfiles and installing again. If you’re still running into this issue after that, let me know and I will reopen this issue.

Solved it for me!

both dependencies can be set to use >=0.14.6? Or maybe >=0.13.5 would be more lenient…

i do not recommend use >= it will allow to update major version, which is most of time breaking

maybe better use will be >=0.13.5 < 1.0.0