mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-04 19:37:18 +00:00
fix(kit): add better logging for non-resolved modules (#30116)
This commit is contained in:
parent
9275b2a7be
commit
76abb53bf1
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user