Vue run failed. Router/index.js reported an error, indicating that the modules I configured could not be found.

content in index.js

import Vue from "vue"
import Router from "vue-router"

import PagesView from "../views/PagesView"
import HomeView from "../views/HomeView"
import CapFaceView from "../views/CapFaceView"

Vue.use(Router)

const router = new Router({
    routes: [{
            path: "/",
            redirect: "/pages/"
        },
        {
            path: "/pages",
            component: PagesView,
            children: [{
                    path: "",
                    redirect: "/pages/home"
                },
                {
                    path: "home",
                    name: "HomeView",
                    meta: {
                        requireAuth: false // 
                    },
                    component: HomeView
                },

                {
                    path: "capfaces",
                    name: "CapFaceView",
                    component: CapFaceView
                }
            ]
        }
    ]
})


export default router

error reported on run

94% asset optimization ERROR Failed to compile with 3 errors17:10:41
These relative modules were not found:

  • .. / views/CapFaceView in. / src/router/index.js
  • .. / views/HomeView in. / src/router/index.js
  • .. / views/PagesView in. / src/router/index.js
May.22,2021

should be the wrong path. Check the path


import CapFaceView from '../views/CapFaceView' 
 ****
Menu