Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

218
Visualizações
Vue Router Duplicating Routes with Name Undefined

I have Vite apps and routing using automatic routing with https://github.com/hannoeru/vite-plugin-pages. When I console.log() on the router/index.ts file, it shows the right routes. But when I tried to console.log() the routes on component with router.getRoutes() it shows some duplicated route with name: undefined.

router/index.ts

console.log("Routes", newRoutes)

const router = createRouter({
  history: createWebHistory(BASE_URL),
  routes: newRoutes,
})

routes


layouts/default.vue

const router = useRouter();
console.log("Router naon", router.getRoutes());

enter image description here

I have tried looking on my Nuxtjs apps and it seems like it doesn't duplicated anything like this. This became problem because when I tried to push router with name, it doesn't go to the right page.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda