[Vue warn]: Error in render: "TypeError: Cannot read property 'meta' of undefined" found in ---> <App> at src/App.vue <Root>

I am a begginer I get this error in the chrome console. below is my router.js file. What can be the cause for the same

import VueRouter from 'vue-router'
import { authGuard } from '../auth/authGuard'
import ExternalApiView from '../views/ExternalApi.vue'
/* eslint-disable */
Vue.use(VueRouter)

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  scrollBehavior() {
    return { x: 0, y: 0 }
  },
  routes: [
    {
      path: '/home',
      name: 'home',
      component: () => import('@/views/Home.vue'),
      meta: {
        pageTitle: 'Home',
        breadcrumb: [
          {
            text: 'Home',
            active: true,
          },
        ],
      },
        beforeEnter: authGuard,
    },
    {
      path: '/second-page',
      name: 'second-page',
      component: () => import('@/views/SecondPage.vue'),
      meta: {
        pageTitle: 'Second Page',
        breadcrumb: [
          {
            text: 'Second Page',
            active: true,
          },
        ],
      },
      beforeEnter: authGuard,
    },
    {
      path: '/external-api',
      name: 'external-api',
      component: ExternalApiView,
      beforeEnter: authGuard,
    },    
    {
      path: '/',
      name: 'login',
      component: () => import('@/views/Login.vue'),
      meta: {
        layout: 'full',       
      },
    },
    {
      path: '/error-404',
      name: 'error-404',
      component: () => import('@/views/error/Error404.vue'),
      meta: {
        layout: 'full',
      },
    },
    {
      path: '/NotAuthorized',
      name: 'not-authorized',
      component: () => import('@/views/NotAuthorized.vue'),      
    },
    {
      path: '*',
      redirect: 'error-404',
    },
  ],
})

Have a look at your call stack to find where the error is originating within <App>. If you still can’t figure out why it’s undefined (likely you’re trying to access the router before it’s ready). Post the related code. We won’t be able to help you with just you router code.

Hi @subashree.Krishnan
There is an issue which you accessing an index where that index is not available on the array.
Please check your matched route if it contain elements equal to the length of pathArray.
If possible please provide source code.