title: Vue3 "export 'createWebHistory, createRouter' was not found in 'vue-router'
body: <p>I'm creating a Vue3 application and after i added the router my first page is loading but it's completely blank.</p>
  <p>I'm receiving the following</p>
  <blockquote>
  <p>Errors: Uncaught TypeError: Object(...) is not a function</p>
  </blockquote>
  <p>In console:</p>
  <blockquote>
  <p>Warning  in ./src/router/index.js &quot;export 'createRouter' was not found
  in 'vue-router'</p>
  <p>Warning  in ./src/router/index.js &quot;export 'createWebHistory' was not
  found in 'vue-router'</p>
  </blockquote>
  <p>router -&gt; index.js</p>
  <pre><code>import { createWebHistory, createRouter } from &quot;vue-router&quot;;
  ...
  
  const routes = [{
          path: &quot;/user/create&quot;,
          name: &quot;createUser&quot;,
          component: createUser,
      },
      {
          path: &quot;/users&quot;,
          name: &quot;listUser&quot;,
          component: listUser,
          meta: { requiresAuth: true }
      },
      {
          path: &quot;/user/show/:id&quot;,
          name: &quot;showUser&quot;,
          component: showUser,
          meta: { requiresAuth: true }
      },
      {
          path: &quot;/user/update/:id&quot;,
          name: &quot;updateUser&quot;,
          component: updateUser,
      },
      {
          path: &quot;/login&quot;,
          name: &quot;login&quot;,
          component: Login
      },
      {
          path: &quot;/register&quot;,
          name: &quot;register&quot;,
          component: Register
      },
      {
          path: &quot;/users/bearer&quot;,
          name: &quot;bearer&quot;,
          component: bearer,
          meta: { requiresAuth: true }
      }
  
  ]
  
  const router = createRouter({
      history: createWebHistory(),
      routes,
  });
  
  router.beforeEach((to, from, next) =&gt; {
      const requiresAuth = to.matched.some(record =&gt; record.meta.requiresAuth);
      const isAuthenticated = firebase.auth().currentUser;
      console.log(&quot;isauthenticated&quot;, isAuthenticated);
      if (requiresAuth &amp;&amp; !isAuthenticated) {
          next(&quot;/login&quot;);
      } else {
          next();
      }
  });
  
  export default router;
  </code></pre>