diff --git a/packages/kit/src/module/install.ts b/packages/kit/src/module/install.ts index aa841fa3b7..7b2a6bb29c 100644 --- a/packages/kit/src/module/install.ts +++ b/packages/kit/src/module/install.ts @@ -118,6 +118,11 @@ export async function loadNuxtModuleInstance (nuxtModule: string | NuxtModule, n } } + // Throw error if module could not be found + if (typeof nuxtModule === 'string') { + throw new TypeError(`Could not load \`${nuxtModule}\`. Is it installed?`) + } + // Throw error if input is not a function if (typeof nuxtModule !== 'function') { throw new TypeError('Nuxt module should be a function: ' + nuxtModule)