From 7177e81442559fee574e9460b4d76a780bb98211 Mon Sep 17 00:00:00 2001 From: Aurion SARL Date: Tue, 5 Nov 2024 12:27:06 +0100 Subject: [PATCH] =?UTF-8?q?fix(kit):=20fall=20back=20to=20meta=C2=A0versio?= =?UTF-8?q?n=20if=20there's=20no=20`module.json`=20(#29793)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/kit/src/module/compatibility.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/kit/src/module/compatibility.ts b/packages/kit/src/module/compatibility.ts index 5bccbf8654..aa5dadcd96 100644 --- a/packages/kit/src/module/compatibility.ts +++ b/packages/kit/src/module/compatibility.ts @@ -58,8 +58,8 @@ export async function getNuxtModuleVersion (module: string | NuxtModule, nuxt: N } // it's possible that the module will be installed, it just hasn't been done yet, preemptively load the instance if (hasNuxtModule(moduleMeta.name)) { - const { buildTimeModuleMeta } = await loadNuxtModuleInstance(moduleMeta.name, nuxt) - return buildTimeModuleMeta.version || false + const { nuxtModule, buildTimeModuleMeta } = await loadNuxtModuleInstance(moduleMeta.name, nuxt) + return buildTimeModuleMeta.version || await nuxtModule.getMeta?.().then(r => r.version) || false } return false }