You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrating the project from nuxt 2 to nuxt 3
I am currently using the vue-tour plugin to render tour in my nuxt 2 application. Able to start the tour using this.$tours["myTour"].start() in mounted function.
** plugins folder nuxt 2**
import Vue from 'vue';
import VueTour from 'vue-tour';
I am migrating the code base to nuxt 3.
Used the same code in nuxt 3 under plugins folder. But this.$tours shows undefined. Even window.$tours throws error.
Tried printing the variable this but it throws undefined.
Trial and error
Even tried registering the plugin as client only. But it doesn't work.
Migrating the project from nuxt 2 to nuxt 3
I am currently using the vue-tour plugin to render tour in my nuxt 2 application. Able to start the tour using this.$tours["myTour"].start() in mounted function.
** plugins folder nuxt 2**
import Vue from 'vue';
import VueTour from 'vue-tour';
require('vue-tour/dist/vue-tour.css');
Vue.use(VueTour);
I am migrating the code base to nuxt 3.
Used the same code in nuxt 3 under plugins folder. But this.$tours shows undefined. Even window.$tours throws error.
Tried printing the variable this but it throws undefined.
Trial and error
Even tried registering the plugin as client only. But it doesn't work.
Also modified the last line of Vue.use to
export default defineNuxtPlugin(nuxtApp => {
nuxtApp.vueApp.use(Vue3Tour);
})
But this fails as well.
Does this plugin support nuxt 3 and if so any idea on how to start the tour after registration ?
Reference
Used this codesand box in vue 3 for reference
https://codesandbox.io/p/sandbox/vue3-tour-bszr2?file=%2Fsrc%2FApp.vue
The text was updated successfully, but these errors were encountered: