From cfa2ccb5f79ae6f664f3e0255e3f3f4694d6f943 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Fri, 27 Jun 2025 13:16:49 +0100 Subject: [PATCH] fix: prioritise `@nuxt/kit` from `nuxt` dependencies --- packages/nuxi/src/utils/kit.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/nuxi/src/utils/kit.ts b/packages/nuxi/src/utils/kit.ts index dcb51fc8c..5852fc3b8 100644 --- a/packages/nuxi/src/utils/kit.ts +++ b/packages/nuxi/src/utils/kit.ts @@ -3,13 +3,7 @@ import { resolveModulePath } from 'exsolve' export async function loadKit(rootDir: string): Promise { try { - // Without PNP (or if users have a local install of kit, we bypass resolving from Nuxt) - let kitPath = resolveModulePath('@nuxt/kit', { try: true, from: rootDir }) - if (!kitPath) { - // Otherwise, we resolve Nuxt _first_ as it is Nuxt's kit dependency that will be used - const nuxtPath = tryResolveNuxt(rootDir) - kitPath = resolveModulePath('@nuxt/kit', { from: nuxtPath || rootDir }) - } + const kitPath = resolveModulePath('@nuxt/kit', { from: tryResolveNuxt(rootDir) || rootDir }) let kit: typeof import('@nuxt/kit') = await import(pathToFileURL(kitPath).href) if (!kit.writeTypes) {