stan
stan
NNuxt
Created by stan on 3/13/2025 in #❓・help
using dependencies in plugins
I am trying to use "vue3-toastify" in nuxt plugin that i am using as global error handler but i am not seeing the toast popped up. What can be the reason for this? The console.log shows up correctly so we know the error is reaching here.
import { toast } from "vue3-toastify";

export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.config.errorHandler = (error, instance, info) => {
console.log("[Nuxt] Error: ", error);
toast.error(`[Nuxt] Error: ${error}`);
};
});
import { toast } from "vue3-toastify";

export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.config.errorHandler = (error, instance, info) => {
console.log("[Nuxt] Error: ", error);
toast.error(`[Nuxt] Error: ${error}`);
};
});
23 replies