nandi95 / vue-toastify

🔥 Simple, extendable, dependency free notification plugin. 🔥
https://vue-toastify.netlify.com/
MIT License
227 stars 12 forks source link

Could not initialize vue-toastify #16

Closed tuski closed 4 years ago

tuski commented 4 years ago

I am using Vue 2.6.10 and I have installed vue-toastify 1.8.0 using npm i vue-toastify

I have added these two lines in main.js file

import VueToastify from "vue-toastify";
Vue.use(VueToastify);

But when I use this.$vToastify.success("easy-peasy"); the IDE is saying that "Property '$vToastify' does not exist on type 'ChartComponent'. Did you mean '$bvToast'?" I can use this.$bvToast.toast() which is Bootstrap's toast component but I cannot use this.$vToastify.success() What I am missing here?

nandi95 commented 4 years ago

That code seems fine. Do you have an example repo?

Here I prepared a codesandbox with the setup like yourself.

nandi95 commented 4 years ago

Closing due to inactivity.