From 335d52499d6ae24f5fd6c0ada9ef09cfc1b3428c Mon Sep 17 00:00:00 2001 From: Thijs Wijnmaalen Date: Mon, 27 Jul 2026 15:58:21 +0200 Subject: [PATCH] fix(nuxt): Move `@nuxt/kit` to peer/dev deps to avoid duplicate on Nuxt 4 `@sentry/nuxt` declared `@nuxt/kit: ^3.13.2` as a regular dependency. On a Nuxt 4 app (`@nuxt/kit@4.x`), the `^3` cap (`>=3.13.2 <4.0.0`) can't dedupe with the app's 4.x, forcing a second copy of `@nuxt/kit` into the tree. Move `@nuxt/kit` to `devDependencies` (for building/testing against 3.x) and add it as a `peerDependency` with a widened range so the host Nuxt app supplies the single, deduplicated version. --- packages/nuxt/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index e758e5799bb0..60a90b807622 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -44,6 +44,7 @@ "access": "public" }, "peerDependencies": { + "@nuxt/kit": "^3.13.2 || ^4.0.0", "nuxt": ">=3.7.0 || 4.x || 5.x", "nitro": "2.x || 3.x" }, @@ -53,7 +54,6 @@ } }, "dependencies": { - "@nuxt/kit": "^3.13.2", "@sentry/browser": "10.67.0", "@sentry/cloudflare": "10.67.0", "@sentry/core": "10.67.0", @@ -64,6 +64,7 @@ "local-pkg": "^1.1.2" }, "devDependencies": { + "@nuxt/kit": "^3.13.2", "@nuxt/nitro-server": "^3.21.6", "nitro": "^3.0.260311-beta", "nuxi": "^3.25.1",