Skip to content

vue-router not installed error #353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
anandrikka opened this issue Jan 15, 2018 · 4 comments
Closed

vue-router not installed error #353

anandrikka opened this issue Jan 15, 2018 · 4 comments

Comments

@anandrikka
Copy link

I followed the same steps mentioned in documentation, but getting following error
Error: [vue-router] not installed. Make sure to callVue.use(VueRouter)before creating root instance. at assert (webpack:///node_modules/vue-router/dist/vue-router.esm.js:10:0 <- index.js:16838:11) at VueRouter.init (webpack:///node_modules/vue-router/dist/vue-router.esm.js:2476:0 <- index.js:19304:46) at VueComponent.beforeCreate (webpack:///node_modules/vue-router/dist/vue-router.esm.js:540:0 <- index.js:17368:22) at callHook (webpack:///node_modules/vue/dist/vue.esm.js:2895:0 <- index.js:5294:21) at VueComponent.Vue._init (webpack:///node_modules/vue/dist/vue.esm.js:4556:0 <- index.js:6955:5) at new VueComponent (webpack:///node_modules/vue/dist/vue.esm.js:4728:0 <- index.js:7127:12) at createConstructor (webpack:///node_modules/vue-test-utils/dist/vue-test-utils.js:4366:0 <- index.js:51028:12) at mount (webpack:///node_modules/vue-test-utils/dist/vue-test-utils.js:4446:0 <- index.js:51108:12) at Context.<anonymous> (webpack:///test/unit/specs/components/App.spec.js:15:18 <- index.js:46638:41)

@vue-bot
Copy link

vue-bot commented Jan 15, 2018

Hello, your issue has been closed because it does not conform to our issue requirements. In order to ensure every issue provides the necessary information for us to investigate, we require the use of the Issue Helper when creating new issues. Thank you!

@vue-bot vue-bot closed this as completed Jan 15, 2018
@kellym
Copy link
Contributor

kellym commented Feb 2, 2018

I got this same error while testing. Did you ever find a solution?

@kellym
Copy link
Contributor

kellym commented Feb 2, 2018

Added a "valid" issue with steps to reproduce. Temporary solution there, too:
#406

@anandrikka
Copy link
Author

@kellym Yes, I made a mistake of keeping Vue.use(xxxx) inside my router file. I'm not supposed to do that when I'm planning to inject the router file directly into my test file. So I moved all the Vue.use(xxx) statements to main.js file. It solved the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants