mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-22 00:19:45 +00:00
fix(kit): add better logging for non-resolved modules (#30116)
This commit is contained in:
parent
62b173fc75
commit
661801dc60
@ -124,6 +124,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
|
// Throw error if input is not a function
|
||||||
if (typeof nuxtModule !== 'function') {
|
if (typeof nuxtModule !== 'function') {
|
||||||
throw new TypeError('Nuxt module should be a function: ' + nuxtModule)
|
throw new TypeError('Nuxt module should be a function: ' + nuxtModule)
|
||||||
|
Loading…
Reference in New Issue
Block a user