Nuxt error page with layout throws vague error `_ctx.$myPluginMethod is not a function`
Closed this issue · 2 comments
BobbieGoede commented
Reproduction
https://github.com/BobbieGoede/nuxt-vuefire-error-page
Steps to reproduce the bug
pnpm i(should create .env and service-account.json for repro automatically)pnpm dev- Open
localhost:3000, it should show the error_ctx.$myPluginMethod is not a function - Refreshing the page again will show the actual error
(0 , __vite_ssr_import_0__.getApps) is not a function(unclear why refreshing does this)
Expected behavior
The actual error thrown by vuefire should be shown
Actual behavior
I assume the error in vuefire is preventing other plugins from providing their methods on the context, which is why the confusing error is shown.
Additional information
The actual error thrown is described in #1627
I investigated this due to nuxt-modules/i18n#3755
BobbieGoede commented
This is probably a nuxt issue, if a plugin throws an error then plugins that follow are skipped and will not run their setup function.
BobbieGoede commented
This might be resolved upstream with nuxt/nuxt#32744, closing since it is only indirectly caused by this module.