title: [Vue Router warn]: No match found for location with path "/errManager/errMessage"
body: <pre><code>I added the routes dynamically at the `router.beforeEach`,I can visit all pages. but when i refresh page at Dynamic Route page,i get a warning `No match found for location with path &quot;XXXXX&quot;` but use `router.getRoutes()`can get all routes. 
  
  this is my code 
  </code></pre>
  <pre><code>await store.dispatch(`user/${UserActionEnum.GET_USER_INFO}`)
  const roles = store.state.user.roles
                      await store.dispatch(`permission/${PermissionActionsEnum.GET_PERMISSION_ROUTES}`, roles)
  store.state.permission.permissionRoutes.forEach((item) =&gt; {
     router.addRoute(item as RouteRecordRaw)
  })
  console.log(router.getRoutes()) //can get all routes
  next({...to, replace: true})
  </code></pre>
  <p>i don't known how to fix it,i hope to get your help</p>