title: TypeError: e is not a function
body: <p>Good day.</p>
  
  <p>When running my app i get the following error related to my <code>vue-router:</code></p>
  
  <blockquote>
    <p>TypeError: e is not a function</p>
  </blockquote>
  
  <p>however i have nothing ... i simply named "e" in my code.</p>
  
  <p>I have a few before each options but nothing too big besides a few cookies deletions.</p>
  
  <p>I have a few imports of apps and i am trying to use them in my router and they all work. So does the cookies. I did the <code>beforeEach()</code> method a few times to see if the error was there but so far no luck.</p>
  
  <p>i got no idea of what is going on.</p>
  
  <p>EDIT: When trying to figure this i was comenting on my code to see if i could find the error and when i removed most of the <code>beforeEach()</code> section i left on the <code>next()</code> function and a new error showed sayin "t is not a function", so i guess for some reason java script is only recognizing the last letters of my funcions, like t in next() and e in some().</p>
  
  <p>EDIT2: After removing unecessary code that i copied from another project apperently the error happens in my next() function.</p>
  
  <p>here's my router code:</p>
  
  <pre class="lang-js prettyprint-override"><code>import Vue from "vue";
  import Router from "vue-router";
  import Dashboard from "@/views/Dashboard.vue";
  import Opcoes from "@/views/settings.vue";
  import LoginForm from "@/components/component/loginForm.vue";
  import store from "./store.js";
  import Cookies from "js-cookie";
  
  Vue.use(Router);
  
  let router = new Router({
    mode: "history",
    base: process.env.BASE_URL,
    routes: [
      {
        path: "/",
        name: "loginForm",
        component: LoginForm,
        meta: {
          guest: true
        }
      },
      {
        path: "/dashboard",
        name: "Dashboard",
        component: Dashboard,
        meta: {
          requiresAuth: true
        }
      },
      {
        path: "/opcoes",
        name: "Opcoes",
        component: Opcoes,
        meta: {
          requiresAuth: true
        }
      },
      {
        path: "/sair",
        name: "Sair",
        component: LoginForm,
        meta: {
          requiresAuth: true
        }
      }
    ]
  });
  
  router.beforeEach((to, from, next) =&gt; {
  
  
   const expirationDate = Cookies.get("expireIn");
    const now = new Date().getTime();
  
    if (now &gt;= expirationDate) {
      Cookies.remove("expirationDate");
      Cookies.remove("token");
      Cookies.remove("userId");
      store.dispatch('LOGOUT');
    } else {
      next();
    }
  });
  
  export default router;
  </code></pre>
  
  <p>Heres a print of my stack trace:</p>
  
  <p><a href="https://i.stack.imgur.com/yO7lO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yO7lO.png" alt="enter image description here"></a></p>