You need to call Vue.use(VueRouter) before this plugin!
See original GitHub issueimport Vue from 'vue';
import router from './routes';
import store from "./store";
import VueRouter from 'vue-router';
Vue.use(VueRouter);
import RouterPrefetch from 'vue-router-prefetch';
Vue.use(RouterPrefetch);
This throws the error You need to call Vue.use(VueRouter) before this plugin!
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Uncaught Error: [vue-composition-api] must call Vue.use ...
You need to Vue.use(CompositionApi) before trying to use anything that belongs to @vue/composition-api . In your main.js ...
Read more >dev mode, mixin in sfc is merged before vue-router plugin install
First you should run Vue.use(VueRouter) before import/require your sfc. I find several workarounds for now: use commonjs to require .vue ...
Read more >Navigation Guards | Vue Router
You can register global before guards using router. ... In that case, you must call next exactly once in any given pass through...
Read more >How to Use Vue Router: A Complete Tutorial - Vue School Blog
We will go over everything you need to know to use Vue Router comfortably. We will cover: Vue Router Fundamentals; Dynamic routing; How...
Read more >Yes, this is how vue-router guards work & when to use them
BUT! It has guards, that we can also call hooks, where you can plug onto. Vue Router has 3 types of guards: Global...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed in 1.1.2
hmm maybe a codesandbox bug, tried it on stackblitz and it’s working fine https://stackblitz.com/edit/js-c7khqh