[Vuejs]-TypeError: e is not a function

0👍

My Big Fat Guess

The error message points to line 2203 (line 1921 is part of a generic error handler). This line is in the Router push() method

onComplete && onComplete(route);

My guess is, somewhere in your code not shown in your question (perhaps in your LoginForm component), you are calling this.$router.push() with a second argument that is not a function, eg

this.$router.push({ name: 'Dashboard' }, somethingNotAFunction)

Other problems (from previous versions of the question)

Your / route (loginForm) has no params so this…

next({
  path: "/",
  params: { nextUrl: to.fullPath }
});

is invalid. Did you perhaps mean to send nextUrl as a query parameter. If so, use

next({ name: 'loginForm', query: { nextUrl: to.fullPath } })

You also have

next({ path: "login" });

and

next({ name: "login" });

neither of which exist in your routes. You should only forward the route request to existing routes.


Finally, if you’re using Vuex, you should not be directly assigning state values. In strict-mode, this

store.state.isLoggedIn = false

will trigger an error. You should be committing state mutations instead.

0👍

If this problem persists try to disable Vue Devtools extension. I had the same thing and disabling devtools extension works for me.

Leave a comment