Skip to content

Nuxt 4 installs vue-router@5 which conflicts with @nuxt/ui peer dependency (^4.5.0) #6184

@snovik

Description

@snovik

Environment

Operating system Windows 10.0.26200
CPU AMD Ryzen 7 5700X 8-Core Processor (16 cores)
Node.js version v24.14.0
nuxt/cli version 3.34.0
Package manager npm 11.9.0
Nuxt version 4.4.2
Nitro version 2.13.1
Builder vite 7.3.1
Config app, compatibilityDate, css, devtools, directus, icon, image, modules, runtimeConfig, seo, site, sitemap, telemetry, ui
Modules @nuxt/eslint 1.15.2, @nuxt/image 2.0.0, @nuxt/scripts 0.13.2, @nuxt/ui 4.5.1, @vueuse/nuxt 14.2.1, @nuxtjs/robots 5.7.1, @nuxtjs/sitemap 7.6.0, nuxt-og-image 6.0.0, nuxt-schema-org 5.0.10, nuxt-link-checker 4.3.9, nuxt-seo-utils 7.0.19, @pinia/nuxt 0.11.3, nuxt-directus-sdk
5.0.0-beta.8, @nuxt/hints 1.0.0, @nuxt/test-utils/module 4.0.0, @nuxt/a11y 1.0.0-alpha.1, @nuxt/content 3.12.0

Is this bug related to Nuxt or Vue?

Nuxt

Package

v4.x

Version

v4.5.1

Reproduction

--

Description

Problem

When running the Nuxt upgrade command (or create nuxt app with nuxt/ui over clean installation):

npx nuxt upgrade --dedupe
npm fails with a dependency resolution error.

The issue appears to be caused by Nuxt installing vue-router@5, while @nuxt/ui expects vue-router@^4.5.0.

Error
npm ERR! While resolving: @nuxt/ui@4.5.1
npm ERR! Found: vue-router@5.0.3
npm ERR! node_modules/vue-router
npm ERR!   vue-router@"^5.0.3" from the root project

npm ERR! Could not resolve dependency:
npm ERR! peerOptional vue-router@"^4.5.0" from @nuxt/ui@4.5.1

Additional context

No response

Logs

 

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageAwaiting initial review and prioritizationv4#4488

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions