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 }