Skip to content
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

Uncaught TypeError: router.afterEach is not a function #2

Closed
keithmifsud opened this issue May 11, 2016 · 3 comments
Closed

Uncaught TypeError: router.afterEach is not a function #2

keithmifsud opened this issue May 11, 2016 · 3 comments

Comments

@keithmifsud
Copy link

Hi,

I have this error and not sure how to solve it. I doubled checked that I'm using the same versions of each package as in this repo.

Uncaught TypeError: router.afterEach is not a function

@coedycode
Copy link

I had the same problem, syncing my instance of the router instead of the imported router module fixed it for me.

`import Vue from 'vue'
import { sync } from 'vuex-router-sync'
import VueRouter from 'vue-router'
import store from './vuex/store'

Vue.use(VueRouter)

let router = new VueRouter({
root: '/',
history: false
})

sync(store, router)`

@keithmifsud
Copy link
Author

Thanks @coedycode ... I'll give it a try on the next new project.

@skyronic
Copy link
Owner

hey the versions are updated and i checked the router now. should be working. Thanks!

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