Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

197
Views
Vue router fails to load child route

I am trying to set up router in my Vue app. Everything seemed to work fine until i started to try implementing children routes. Now when i try to access child route i get an error message along with some warnings: What happens when i click on child router-link

My router setup:

const router = createRouter({
history: createWebHistory(),
routes: [
    { path: '/', redirect: '/welcome' },
    {
      name: 'welcome',
      path: '/welcome',
      component: WelcomePage
    },
    {
        name:'noteLists',
        path: '/noteLists',
        component: NoteListLinks,
        children: [
          {
            name:'noteListSheets',
            path: ':id',
            components: FullNoteSheet
          }
        ]
    }
],
linkActiveClass: 'active'

});

All other route links work fine.

The components template where child links are used and rendered looks like that:

<template>
<router-link 
    :to="setNoteListLink(entry.id)"
    :key=entry.id
    v-for="entry in notesListEntry"
    >
    {{entry.name}}
</router-link>
<router-view></router-view>

Function setNoteListLink just creates a links like '/noteList/1'.

The error says that it "Cannot read property 'writeDebug' of undefined" and writeDebug is a method on a component that it tries to load when i click on the route (FullNoteSheet), so i assume there is something wrong with the component and not the router. But component works just fine if i try to load it separately, by jst putting it in App component template.

If you have dealt with such issues and know the solution please let me know.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You have a typo in the noteListSheets route; It should be component: FullNoteSheet not components: FullNoteSheet

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!