2023年10月3日 星期二

Vue3 vue-typescript-admin-template npm run serve error fix


 - 支援 node.js v14 版本

 - 將 package.json 降版本 "webpack": "4.45.0"

 - 將TS嚴格模式關閉 tsconfig.json compilerOptions.strict = false


 - ERROR in src/components/Breadcrumb/index.vue:52:18

 matched = [{ path: '/dashboard', meta: { title: 'dashboard' } } as RouteRecord].concat(matched)

解:

const route: RouteRecord = {

        path: '/dashboard',

        meta: { title: 'dashboard' },

        regex: undefined,

        components: {},

        instances: {},

        props: false

      }

      matched = [route].concat(matched)