mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
fix(kit): show correct error when module can't be loaded (#24957)
This commit is contained in:
parent
9dc14c1891
commit
d3ea8fed97
@ -90,7 +90,7 @@ export async function loadNuxtModuleInstance (nuxtModule: string | NuxtModule, n
|
||||
continue
|
||||
}
|
||||
}
|
||||
if (!nuxtModule && error) {
|
||||
if (typeof nuxtModule !== 'function' && error) {
|
||||
logger.error(`Error while requiring module \`${nuxtModule}\`: ${error}`)
|
||||
throw error
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user