diff --git a/packages/kit/src/template.ts b/packages/kit/src/template.ts index 194434f69f..1816ccf536 100644 --- a/packages/kit/src/template.ts +++ b/packages/kit/src/template.ts @@ -120,7 +120,7 @@ export async function _generateTypes (nuxt: Nuxt) { const modulePaths = await resolveNuxtModule(rootDirWithSlash, nuxt.options._installedModules .filter(m => m.entryPath) - .map(m => getDirectory(m.entryPath)), + .map(m => getDirectory(m.entryPath!)), ) const isV4 = nuxt.options.future?.compatibilityVersion === 4 diff --git a/packages/nuxt/src/core/nitro.ts b/packages/nuxt/src/core/nitro.ts index 84d6aec7dd..4c96a48666 100644 --- a/packages/nuxt/src/core/nitro.ts +++ b/packages/nuxt/src/core/nitro.ts @@ -43,7 +43,7 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) { const modules = await resolveNuxtModule(rootDirWithSlash, nuxt.options._installedModules .filter(m => m.entryPath) - .map(m => m.entryPath), + .map(m => m.entryPath!), ) const nitroConfig: NitroConfig = defu(nuxt.options.nitro, { diff --git a/packages/schema/src/config/internal.ts b/packages/schema/src/config/internal.ts index 5f6545c469..346beff214 100644 --- a/packages/schema/src/config/internal.ts +++ b/packages/schema/src/config/internal.ts @@ -23,7 +23,10 @@ export default defineUntypedSchema({ _nuxtConfigFiles: [], /** @private */ appDir: '', - /** @private */ + /** + * @private + * @type {Array<{ meta: ModuleMeta; timings?: Record; entryPath?: string }>} + */ _installedModules: [], /** @private */ _modules: [],