若依前后分离,报错 Error: Cannot find module ‘@/views/system/user/index

在若依分离版的前端项目中遇到打包后服务器上路由无法切换的问题,解决方案是在`src/store/modules/permission.js`文件内的`loadView`函数中,将动态导入语句从异步方式改为同步方式,即将`return () => import(`@/views/${view}

问题: 若依分离版下前端打包部署到服务器上路由切换不了

解决:在 /src/store/modules/permission.js中

找到loadView

 将return () => import(`@/views/${view}`)

替换成:return (resolve) => require([`@/views/${view}`], resolve)

import Vue from 'vue' import Router from 'vue-router' Vue.use(Router) /* Layout */ import Layout from '@/layout' // import { createRouter, createWebHashHistory } from 'vue-router' // import systemRoutes from './modules/system' // import ragRoutes from './modules/rag' // 引入RAG路由 /** * Note: 路由配置项 * * hidden: true // 当设置 true 的时候该路由不会再侧边栏出现 如401,login等页面,或者如一些编辑页面/edit/1 * alwaysShow: true // 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式--如组件页面 * // 只有一个时,会将那个子路由当做根路由显示在侧边栏--如引导页面 * // 若你想不管路由下面的 children 声明的个数都显示你的根路由 * // 你可以设置 alwaysShow: true,这样它就会忽略之前定义的规则,一直显示根路由 * redirect: noRedirect // 当设置 noRedirect 的时候该路由在面包屑导航中不可被点击 * name:'router-name' // 设定路由的名字,一定要填写不然使用<keep-alive>时会出现各种问题 * query: '{"id": 1, "name": "ry"}' // 访问路由的默认传递参数 * roles: ['admin', 'common'] // 访问路由的角色权限 * permissions: ['a:a:a', 'b:b:b'] // 访问路由的菜单权限 * meta : { noCache: true // 如果设置为true,则不会被 <keep-alive> 缓存(默认 false) title: 'title' // 设置该路由在侧边栏和面包屑中展示的名字 icon: 'svg-name' // 设置该路由的图标,对应路径src/assets/icons/svg breadcrumb: false // 如果设置为false,则不会在breadcrumb面包屑中显示 activeMenu: '/system/user' // 当路由设置了该属性,则会高亮相对应的侧边栏。 } */ // 公共路由 export const constantRoutes = [ { path: '/redirect', component: Layout, hidden: true, children: [ { path: '/redirect/:path(.*)', component: () => import('@/views/redirect') } ] }, { path: '/login', component: () => import('@/views/login'), hidden: true }, { path: '/register', component: () => import('@/views/register'), hidden: true }, { path: '/404', component: () => import('@/views/error/404'), hidden: true }, { path: '/401', component: () => import('@/views/error/401'), hidden: true }, { path: '', component: Layout, redirect: 'index', children: [ { path: 'index', component: () => import('@/views/index'), name: 'Index', meta: { title: '首页', icon: 'dashboard', affix: true } } ] }, { path: '/user', component: Layout, hidden: true, redirect: 'noredirect', children: [ { path: 'profile', component: () => import('@/views/system/user/profile/index'), name: 'Profile', meta: { title: '个人中心', icon: 'user' } } ] } ] // 动态路由,基于用户权限动态去加载 export const dynamicRoutes = [ { path: '/system/user-auth', component: Layout, hidden: true, permissions: ['system:user:edit'], children: [ { path: 'role/:userId(\\d+)', component: () => import('@/views/system/user/authRole'), name: 'AuthRole', meta: { title: '分配角色', activeMenu: '/system/user' } } ] }, { path: '/system/role-auth', component: Layout, hidden: true, permissions: ['system:role:edit'], children: [ { path: 'user/:roleId(\\d+)', component: () => import('@/views/system/role/authUser'), name: 'AuthUser', meta: { title: '分配用户', activeMenu: '/system/role' } } ] }, { path: '/system/dict-data', component: Layout, hidden: true, permissions: ['system:dict:list'], children: [ { path: 'index/:dictId(\\d+)', component: () => import('@/views/system/dict/data'), name: 'Data', meta: { title: '字典数据', activeMenu: '/system/dict' } } ] }, { path: '/monitor/job-log', component: Layout, hidden: true, permissions: ['monitor:job:list'], children: [ { path: 'index/:jobId(\\d+)', component: () => import('@/views/monitor/job/log'), name: 'JobLog', meta: { title: '调度日志', activeMenu: '/monitor/job' } } ] }, { path: '/tool/gen-edit', component: Layout, hidden: true, permissions: ['tool:gen:edit'], children: [ { path: 'index/:tableId(\\d+)', component: () => import('@/views/tool/gen/editTable'), name: 'GenEdit', meta: { title: '修改生成配置', activeMenu: '/tool/gen' } } ] } ] // 防止连续点击多次路由报错 let routerPush = Router.prototype.push let routerReplace = Router.prototype.replace // push Router.prototype.push = function push(location) { return routerPush.call(this, location).catch(err => err) } // replace Router.prototype.replace = function push(location) { return routerReplace.call(this, location).catch(err => err) } export default new Router({ mode: 'history', // 去掉url中的# scrollBehavior: () => ({ y: 0 }), routes: constantRoutes }) 上述代码是router/index.js文件,请根据代码帮我完成知识库系统三个路由的定义
10-11
Started by user admin Running as SYSTEM Building in workspace /var/jenkins_home/workspace/zq-web The recommended git tool is: NONE using credential jenkins-username > git rev-parse --resolve-git-dir /var/jenkins_home/workspace/zq-web/.git # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url http://39.105.179.91:30080/smart-factory/smart-web.git # timeout=10 Fetching upstream changes from http://39.105.179.91:30080/smart-factory/smart-web.git > git --version # timeout=10 > git --version # 'git version 2.39.5' using GIT_ASKPASS to set credentials > git fetch --tags --force --progress -- http://39.105.179.91:30080/smart-factory/smart-web.git +refs/heads/*:refs/remotes/origin/* # timeout=10 > git rev-parse refs/remotes/origin/main^{commit} # timeout=10 Checking out Revision 00dafb09bd552fe14c7cf270a553c497223d95b7 (refs/remotes/origin/main) > git config core.sparsecheckout # timeout=10 > git checkout -f 00dafb09bd552fe14c7cf270a553c497223d95b7 # timeout=10 Commit message: "first" > git rev-list --no-walk 00dafb09bd552fe14c7cf270a553c497223d95b7 # timeout=10 [zq-web] $ /bin/sh -xe /tmp/jenkins12597757760880265825.sh + npm config set registry https://registry.npmmirror.com -g + npm install --force npm warn using --force Recommended protections disabled. npm warn ERESOLVE overriding peer dependency npm warn While resolving: vue-echarts@7.0.3 npm warn Found: echarts@6.0.0 npm warn node_modules/echarts npm warn echarts@"^6.0.0" from the root project npm warn npm warn Could not resolve dependency: npm warn peer echarts@"^5.5.1" from vue-echarts@7.0.3 npm warn node_modules/vue-echarts npm warn vue-echarts@"^7.0.3" from the root project npm warn npm warn Conflicting peer dependency: echarts@5.6.0 npm warn node_modules/echarts npm warn peer echarts@"^5.5.1" from vue-echarts@7.0.3 npm warn node_modules/vue-echarts npm warn vue-echarts@"^7.0.3" from the root project removed 125 packages in 845ms 39 packages are looking for funding run `npm fund` for details + npm install --save-dev vite-plugin-node-polyfills crypto-browserify --force npm warn using --force Recommended protections disabled. npm warn ERESOLVE overriding peer dependency npm warn While resolving: vue-echarts@7.0.3 npm warn Found: echarts@6.0.0 npm warn node_modules/echarts npm warn echarts@"^6.0.0" from the root project npm warn npm warn Could not resolve dependency: npm warn peer echarts@"^5.5.1" from vue-echarts@7.0.3 npm warn node_modules/vue-echarts npm warn vue-echarts@"^7.0.3" from the root project npm warn npm warn Conflicting peer dependency: echarts@5.6.0 npm warn node_modules/echarts npm warn peer echarts@"^5.5.1" from vue-echarts@7.0.3 npm warn node_modules/vue-echarts npm warn vue-echarts@"^7.0.3" from the root project added 125 packages in 3s 78 packages are looking for funding run `npm fund` for details + npm run build > vite-project@0.0.0 build > vue-tsc -b && vite build src/components/Menu.vue(58,1): error TS6133: 'router' is declared but its value is never read. src/components/Menu.vue(59,1): error TS6192: All imports in import declaration are unused. src/components/Menu.vue(63,7): error TS6133: 'switchValue' is declared but its value is never read. src/components/Menu.vue(78,7): error TS6133: 'handleSwitch' is declared but its value is never read. src/request/api/record.ts(5,6): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. src/request/api/record.ts(15,32): error TS7006: Parameter 'data' implicitly has an 'any' type. src/request/api/record.ts(18,33): error TS7006: Parameter 'id' implicitly has an 'any' type. src/request/api/user.ts(5,6): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. src/request/api/user.ts(21,26): error TS7006: Parameter 'data' implicitly has an 'any' type. src/routes/index.ts(69,41): error TS2307: Cannot find module '@/views/MonitorView.vue' or its corresponding type declarations. src/store/modules/report.ts(13,22): error TS7006: Parameter 'data' implicitly has an 'any' type. src/store/modules/user.ts(17,21): error TS7006: Parameter 'data' implicitly has an 'any' type. src/store/modules/user.ts(34,14): error TS2339: Property 'token' does not exist on type '{ userLogin(data: any): Promise<string>; userLogout(): Promise<string>; } & { userInfo: {}; } & _StoreWithState<"User", { userInfo: {}; }, {}, { userLogin(data: any): Promise<string>; userLogout(): Promise<...>; }> & _StoreWithGetters_Readonly<...> & _StoreWithGetters_Writable<...> & PiniaCustomProperties<...>'. src/store/modules/user.ts(35,14): error TS2339: Property 'username' does not exist on type '{ userLogin(data: any): Promise<string>; userLogout(): Promise<string>; } & { userInfo: {}; } & _StoreWithState<"User", { userInfo: {}; }, {}, { userLogin(data: any): Promise<string>; userLogout(): Promise<...>; }> & _StoreWithGetters_Readonly<...> & _StoreWithGetters_Writable<...> & PiniaCustomProperties<...>'. src/store/modules/user.ts(36,14): error TS2339: Property 'avatar' does not exist on type '{ userLogin(data: any): Promise<string>; userLogout(): Promise<string>; } & { userInfo: {}; } & _StoreWithState<"User", { userInfo: {}; }, {}, { userLogin(data: any): Promise<string>; userLogout(): Promise<...>; }> & _StoreWithGetters_Readonly<...> & _StoreWithGetters_Writable<...> & PiniaCustomProperties<...>'. src/store/modules/user.ts(37,28): error TS2554: Expected 0 arguments, but got 1. src/store/modules/user.ts(41,41): error TS2304: Cannot find name 'result'. src/views/authorityManage/index.vue(144,39): error TS2551: Property 'name1' does not exist on type '{ name: string; region: string; }'. Did you mean 'name'? src/views/authorityManage/index.vue(147,39): error TS2551: Property 'name2' does not exist on type '{ name: string; region: string; }'. Did you mean 'name'? src/views/authorityManage/index.vue(150,39): error TS2551: Property 'name3' does not exist on type '{ name: string; region: string; }'. Did you mean 'name'? src/views/authorityManage/index.vue(153,39): error TS2551: Property 'name4' does not exist on type '{ name: string; region: string; }'. Did you mean 'name'? src/views/authorityManage/index.vue(177,26): error TS2339: Property 'handleUpload' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { Plus: DefineComponent<{}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 12 more ..., any>; ... 26 more ...; resetMemberForm: (formEl: any) => void; }, ... 23 more ..., {}>'. src/views/authorityManage/index.vue(194,26): error TS2339: Property 'handleUpload' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { Plus: DefineComponent<{}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 12 more ..., any>; ... 26 more ...; resetMemberForm: (formEl: any) => void; }, ... 23 more ..., {}>'. src/views/authorityManage/index.vue(287,7): error TS6133: 'defaultProps' is declared but its value is never read. src/views/authorityManage/index.vue(351,22): error TS7006: Parameter 'tab' implicitly has an 'any' type. src/views/authorityManage/index.vue(351,26): error TS7006: Parameter 'event' implicitly has an 'any' type. src/views/authorityManage/index.vue(364,25): error TS6133: 'node' is declared but its value is never read. src/views/authorityManage/index.vue(364,25): error TS7006: Parameter 'node' implicitly has an 'any' type. src/views/authorityManage/index.vue(364,30): error TS6133: 'data' is declared but its value is never read. src/views/authorityManage/index.vue(364,30): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/authorityManage/index.vue(381,25): error TS7006: Parameter 'index' implicitly has an 'any' type. src/views/authorityManage/index.vue(381,32): error TS7006: Parameter 'row' implicitly has an 'any' type. src/views/authorityManage/index.vue(391,29): error TS7006: Parameter 'index' implicitly has an 'any' type. src/views/authorityManage/index.vue(391,36): error TS7006: Parameter 'row' implicitly has an 'any' type. src/views/authorityManage/index.vue(395,33): error TS7006: Parameter 'formEl' implicitly has an 'any' type. src/views/authorityManage/index.vue(397,26): error TS7006: Parameter 'valid' implicitly has an 'any' type. src/views/authorityManage/index.vue(397,33): error TS7006: Parameter 'fields' implicitly has an 'any' type. src/views/authorityManage/index.vue(406,26): error TS7006: Parameter 'formEl' implicitly has an 'any' type. src/views/authorityManage/index.vue(412,33): error TS7006: Parameter 'formEl' implicitly has an 'any' type. src/views/authorityManage/index.vue(414,26): error TS7006: Parameter 'valid' implicitly has an 'any' type. src/views/authorityManage/index.vue(414,33): error TS7006: Parameter 'fields' implicitly has an 'any' type. src/views/authorityManage/index.vue(423,26): error TS7006: Parameter 'formEl' implicitly has an 'any' type. src/views/crownBlock.vue(82,28): error TS2339: Property 'resetForm' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { formInline: { user: string; region: string; date: string; }; value1: Ref<boolean, boolean>; value2: Ref<boolean, boolean>; list: Ref<...>; }, ... 23 more ..., {}>'. src/views/crownBlock.vue(82,38): error TS2339: Property 'ruleFormRef' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { formInline: { user: string; region: string; date: string; }; value1: Ref<boolean, boolean>; value2: Ref<boolean, boolean>; list: Ref<...>; }, ... 23 more ..., {}>'. src/views/crownBlock.vue(83,43): error TS2339: Property 'onSubmit' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { formInline: { user: string; region: string; date: string; }; value1: Ref<boolean, boolean>; value2: Ref<boolean, boolean>; list: Ref<...>; }, ... 23 more ..., {}>'. src/views/crownBlock.vue(89,22): error TS2339: Property 'tableData' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { formInline: { user: string; region: string; date: string; }; value1: Ref<boolean, boolean>; value2: Ref<boolean, boolean>; list: Ref<...>; }, ... 23 more ..., {}>'. src/views/deliverRecord/deliverDetail.vue(14,19): error TS2339: Property 'cargo_code' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(18,55): error TS2339: Property 'car_schedule_id' does not exist on type '{}'. src/views/deliverRecord/deliverDetail.vue(19,56): error TS2339: Property 'cargo_name' does not exist on type '{}'. src/views/deliverRecord/deliverDetail.vue(20,68): error TS2339: Property 'gross_weight' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(21,56): error TS2339: Property 'car_plate_number' does not exist on type '{}'. src/views/deliverRecord/deliverDetail.vue(22,67): error TS2339: Property 'spec' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(23,57): error TS2339: Property 'warranty_start_date' does not exist on type '{}'. src/views/deliverRecord/deliverDetail.vue(23,88): error TS2339: Property 'warranty_start_date' does not exist on type '{}'. src/views/deliverRecord/deliverDetail.vue(23,126): error TS2339: Property 'warranty_end_date' does not exist on type '{}'. src/views/deliverRecord/deliverDetail.vue(23,155): error TS2339: Property 'warranty_end_date' does not exist on type '{}'. src/views/deliverRecord/deliverDetail.vue(24,68): error TS2339: Property 'cargo_code' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(25,54): error TS2339: Property 'shift_plan' does not exist on type '{}'. src/views/deliverRecord/deliverDetail.vue(29,78): error TS2339: Property 'step_name' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(29,101): error TS2339: Property 'step_name' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(30,51): error TS2339: Property 'operator' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(31,52): error TS2339: Property 'create_time' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(32,51): error TS2339: Property 'car_plate_number' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(35,25): error TS7022: 'item' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. src/views/deliverRecord/deliverDetail.vue(35,33): error TS2448: Block-scoped variable 'item' used before its declaration. src/views/deliverRecord/deliverDetail.vue(46,48): error TS2339: Property 'flow_info' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(133,33): error TS6133: 'ArrowRight' is declared but its value is never read. src/views/deliverRecord/deliverDetail.vue(137,1): error TS6133: 'log' is declared but its value is never read. src/views/deliverRecord/deliverDetail.vue(150,28): error TS7006: Parameter 'index' implicitly has an 'any' type. src/views/deliverRecord/deliverDetail.vue(152,14): error TS2339: Property 'schedule_step_info' does not exist on type '{}'. src/views/deliverRecord/deliverDetail.vue(152,37): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/deliverRecord/deliverDetail.vue(153,24): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. src/views/deliverRecord/deliverDetail.vue(155,26): error TS2339: Property 'step_info' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(155,40): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/deliverRecord/deliverDetail.vue(156,24): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. src/views/deliverRecord/deliverDetail.vue(160,29): error TS2339: Property 'step_name' does not exist on type 'never'. src/views/deliverRecord/deliverDetail.vue(163,3): error TS2554: Expected 2 arguments, but got 1. src/views/deliverRecord/deliverDetail.vue(168,22): error TS7006: Parameter 'tab' implicitly has an 'any' type. src/views/deliverRecord/deliverDetail.vue(168,27): error TS6133: 'event' is declared but its value is never read. src/views/deliverRecord/deliverDetail.vue(168,27): error TS7006: Parameter 'event' implicitly has an 'any' type. src/views/deliverRecord/deliverDetail.vue(172,26): error TS7006: Parameter 'id' implicitly has an 'any' type. src/views/deliverRecord/deliverDetail.vue(174,10): error TS2339: Property 'code' does not exist on type 'AxiosResponse<any, any>'. src/views/deliverRecord/index.vue(22,24): error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ handleSearch0: (data: any) => void; handleSearch1: (data: any) => void; handleSearch2: (data: any) => void; handleSearch3: (data: any) => void; }'. No index signature with a parameter of type 'string' was found on type '{ handleSearch0: (data: any) => void; handleSearch1: (data: any) => void; handleSearch2: (data: any) => void; handleSearch3: (data: any) => void; }'. src/views/deliverRecord/index.vue(23,23): error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ handleClear0: () => void; handleClear1: () => void; handleClear2: () => void; handleClear3: () => void; }'. src/views/deliverRecord/index.vue(23,37): error TS2551: Property 'clearMethodName' does not exist on type '{ name: string; input: string; list: never[]; methodName: string; activeName: string; } | { name: string; input: string; list: never[]; methodName: string; activeName?: undefined; }'. Did you mean 'methodName'? Property 'clearMethodName' does not exist on type '{ name: string; input: string; list: never[]; methodName: string; activeName: string; }'. src/views/deliverRecord/index.vue(28,22): error TS2339: Property 'value' does not exist on type 'never'. src/views/deliverRecord/index.vue(29,24): error TS2339: Property 'label' does not exist on type 'never'. src/views/deliverRecord/index.vue(30,24): error TS2339: Property 'value' does not exist on type 'never'. src/views/deliverRecord/index.vue(68,39): error TS2339: Property 'preserveExpanded' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { Search: DefineComponent<{}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 12 more ..., any>; ... 22 more ...; handleDetail: (index: any, row: any) => void; }, ... 23 more ..., {}>'. src/views/deliverRecord/index.vue(99,35): error TS6133: 'scope' is declared but its value is never read. src/views/deliverRecord/index.vue(114,34): error TS6133: 'row' is declared but its value is never read. src/views/deliverRecord/index.vue(160,28): error TS2339: Property 'disabled' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { Search: DefineComponent<{}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 12 more ..., any>; ... 22 more ...; handleDetail: (index: any, row: any) => void; }, ... 23 more ..., {}>'. src/views/deliverRecord/index.vue(161,30): error TS2339: Property 'background' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { Search: DefineComponent<{}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 12 more ..., any>; ... 22 more ...; handleDetail: (index: any, row: any) => void; }, ... 23 more ..., {}>'. src/views/deliverRecord/index.vue(292,23): error TS7006: Parameter 'date' implicitly has an 'any' type. src/views/deliverRecord/index.vue(300,25): error TS7006: Parameter 'status' implicitly has an 'any' type. src/views/deliverRecord/index.vue(307,19): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/deliverRecord/index.vue(313,19): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/deliverRecord/index.vue(319,19): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/deliverRecord/index.vue(325,19): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/deliverRecord/index.vue(326,17): error TS2551: Property 'receiver_name' does not exist on type '{ car_plate_number: string; car_schedule_id: string; cargo_code: string; receive_name: string; limit: number; page: number; search_text: string; sort: string; sorts: string; start: number; state: string; time_condition: { ...; }[]; work_type: string; status: number; }'. Did you mean 'receive_name'? src/views/deliverRecord/index.vue(345,17): error TS2551: Property 'receiver_name' does not exist on type '{ car_plate_number: string; car_schedule_id: string; cargo_code: string; receive_name: string; limit: number; page: number; search_text: string; sort: string; sorts: string; start: number; state: string; time_condition: { ...; }[]; work_type: string; status: number; }'. Did you mean 'receive_name'? src/views/deliverRecord/index.vue(358,15): error TS2551: Property 'receiver_name' does not exist on type '{ car_plate_number: string; car_schedule_id: string; cargo_code: string; receive_name: string; limit: number; page: number; search_text: string; sort: string; sorts: string; start: number; state: string; time_condition: { ...; }[]; work_type: string; status: number; }'. Did you mean 'receive_name'? src/views/deliverRecord/index.vue(374,27): error TS2304: Cannot find name 'TabsPaneContext'. src/views/deliverRecord/index.vue(374,44): error TS6133: 'event' is declared but its value is never read. src/views/deliverRecord/index.vue(384,29): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/deliverRecord/index.vue(387,10): error TS2339: Property 'code' does not exist on type 'AxiosResponse<any, any>'. src/views/deliverRecord/index.vue(390,33): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/deliverRecord/index.vue(400,32): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/deliverRecord/index.vue(402,10): error TS2339: Property 'code' does not exist on type 'AxiosResponse<any, any>'. src/views/deliverRecord/index.vue(404,5): error TS2322: Type '{ label: unknown; value: unknown; }[]' is not assignable to type 'never[]'. Type '{ label: unknown; value: unknown; }' is not assignable to type 'never'. src/views/deliverRecord/index.vue(404,47): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/deliverRecord/index.vue(406,5): error TS2322: Type '{ label: unknown; value: unknown; }[]' is not assignable to type 'never[]'. Type '{ label: unknown; value: unknown; }' is not assignable to type 'never'. src/views/deliverRecord/index.vue(406,48): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/deliverRecord/index.vue(408,5): error TS2322: Type '{ label: unknown; value: unknown; }[]' is not assignable to type 'never[]'. Type '{ label: unknown; value: unknown; }' is not assignable to type 'never'. src/views/deliverRecord/index.vue(408,48): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/deliverRecord/index.vue(410,5): error TS2322: Type '{ label: unknown; value: unknown; }[]' is not assignable to type 'never[]'. Type '{ label: unknown; value: unknown; }' is not assignable to type 'never'. src/views/deliverRecord/index.vue(410,48): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/deliverRecord/index.vue(421,25): error TS6133: 'index' is declared but its value is never read. src/views/deliverRecord/index.vue(421,25): error TS7006: Parameter 'index' implicitly has an 'any' type. src/views/deliverRecord/index.vue(421,31): error TS7006: Parameter 'row' implicitly has an 'any' type. src/views/deliverRecord/index.vue(423,8): error TS2339: Property 'sap_room' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/deliverRecord/index.vue(424,8): error TS2339: Property 'calculated_room' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/deliverRecord/index.vue(425,8): error TS2339: Property 'small_room' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/deliverRecord/index.vue(426,8): error TS2339: Property 'receiver_name' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/deliverRecord/index.vue(429,23): error TS7006: Parameter 'index' implicitly has an 'any' type. src/views/deliverRecord/index.vue(429,29): error TS7006: Parameter 'row' implicitly has an 'any' type. src/views/deliverRecord/index.vue(445,26): error TS7006: Parameter 'warrantyDate' implicitly has an 'any' type. src/views/deliverRecord/index.vue(445,40): error TS7006: Parameter 'receiptDate' implicitly has an 'any' type. src/views/deliverRecord/index.vue(451,26): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. src/views/deliverRecord/index.vue(451,36): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. src/views/forkliftView.vue(87,30): error TS2339: Property 'resetForm' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { value1: Ref<boolean, boolean>; value2: Ref<boolean, boolean>; list: Ref<{ order: number; time: number; status: string; }[], { order: number; time: number; status: string; }[] | { ...; }[]>; formInline: { ...; }; tableData: { ...; }[]; }, ... 23 more ...'. src/views/forkliftView.vue(87,40): error TS2339: Property 'ruleFormRef' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { value1: Ref<boolean, boolean>; value2: Ref<boolean, boolean>; list: Ref<{ order: number; time: number; status: string; }[], { order: number; time: number; status: string; }[] | { ...; }[]>; formInline: { ...; }; tableData: { ...; }[]; }, ... 23 more ...'. src/views/forkliftView.vue(88,45): error TS2339: Property 'onSubmit' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { value1: Ref<boolean, boolean>; value2: Ref<boolean, boolean>; list: Ref<{ order: number; time: number; status: string; }[], { order: number; time: number; status: string; }[] | { ...; }[]>; formInline: { ...; }; tableData: { ...; }[]; }, ... 23 more ...'. src/views/forkliftView.vue(118,32): error TS2339: Property 'gridData' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { value1: Ref<boolean, boolean>; value2: Ref<boolean, boolean>; list: Ref<{ order: number; time: number; status: string; }[], { order: number; time: number; status: string; }[] | { ...; }[]>; formInline: { ...; }; tableData: { ...; }[]; }, ... 23 more ...'. src/views/goodsStat/goodsDetail.vue(12,24): error TS2339: Property 'methodMap' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { ruleFormRef: Ref<any, any>; formInline: { user: string; region: string; date: string; }; tableData: { date: string; name: string; address: string; sum: number; }[]; sortsArr: Ref<...>; onSubmit: () => void; resetForm: (formEl: any) => void; }, ... 23...'. src/views/goodsStat/goodsDetail.vue(16,22): error TS2339: Property 'value' does not exist on type 'never'. src/views/goodsStat/goodsDetail.vue(17,24): error TS2339: Property 'label' does not exist on type 'never'. src/views/goodsStat/goodsDetail.vue(18,24): error TS2339: Property 'value' does not exist on type 'never'. src/views/goodsStat/goodsDetail.vue(100,20): error TS7006: Parameter 'formEl' implicitly has an 'any' type. src/views/goodsStat/index.vue(83,26): error TS7016: Could not find a declaration file for module '@/components/LineBarChart.vue'. '/var/jenkins_home/workspace/zq-web/src/components/LineBarChart.vue' implicitly has an 'any' type. src/views/goodsStat/index.vue(84,26): error TS7016: Could not find a declaration file for module '@/components/StackedChart.vue'. '/var/jenkins_home/workspace/zq-web/src/components/StackedChart.vue' implicitly has an 'any' type. src/views/goodsStat/index.vue(88,21): error TS6133: 'name' is declared but its value is never read. src/views/goodsStat/index.vue(88,21): error TS7006: Parameter 'name' implicitly has an 'any' type. src/views/goodsStat/index.vue(88,26): error TS7006: Parameter 'index' implicitly has an 'any' type. src/views/homeView.vue(14,24): error TS2339: Property 'nickname' does not exist on type '{}'. src/views/loginView.vue(74,53): error TS2304: Cannot find name 'ComponentInternalInstance'. src/views/monitorView.vue(18,40): error TS6133: 'value' is declared but its value is never read. src/views/personStat/index.vue(100,23): error TS7016: Could not find a declaration file for module '@/components/RingChart.vue'. '/var/jenkins_home/workspace/zq-web/src/components/RingChart.vue' implicitly has an 'any' type. src/views/personStat/index.vue(148,20): error TS7006: Parameter 'formEl' implicitly has an 'any' type. src/views/receiveRecord/index.vue(22,24): error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ handleSearch0: (data: any) => void; handleSearch1: (data: any) => void; handleSearch2: (data: any) => void; handleSearch3: (data: any) => void; }'. No index signature with a parameter of type 'string' was found on type '{ handleSearch0: (data: any) => void; handleSearch1: (data: any) => void; handleSearch2: (data: any) => void; handleSearch3: (data: any) => void; }'. src/views/receiveRecord/index.vue(23,23): error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ handleClear0: () => void; handleClear1: () => void; handleClear2: () => void; handleClear3: () => void; }'. No index signature with a parameter of type 'string' was found on type '{ handleClear0: () => void; handleClear1: () => void; handleClear2: () => void; handleClear3: () => void; }'. src/views/receiveRecord/index.vue(28,22): error TS2339: Property 'value' does not exist on type 'never'. src/views/receiveRecord/index.vue(29,24): error TS2339: Property 'label' does not exist on type 'never'. src/views/receiveRecord/index.vue(30,24): error TS2339: Property 'value' does not exist on type 'never'. src/views/receiveRecord/index.vue(68,39): error TS2339: Property 'preserveExpanded' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { Search: DefineComponent<{}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 12 more ..., any>; ... 22 more ...; handleDetail: (index: any, row: any) => void; }, ... 23 more ..., {}>'. src/views/receiveRecord/index.vue(100,34): error TS6133: 'row' is declared but its value is never read. src/views/receiveRecord/index.vue(123,35): error TS6133: 'scope' is declared but its value is never read. src/views/receiveRecord/index.vue(150,28): error TS2339: Property 'disabled' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { Search: DefineComponent<{}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 12 more ..., any>; ... 22 more ...; handleDetail: (index: any, row: any) => void; }, ... 23 more ..., {}>'. src/views/receiveRecord/index.vue(151,30): error TS2339: Property 'background' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { Search: DefineComponent<{}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 12 more ..., any>; ... 22 more ...; handleDetail: (index: any, row: any) => void; }, ... 23 more ..., {}>'. src/views/receiveRecord/index.vue(165,33): error TS2339: Property 'sap_room' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/receiveRecord/index.vue(168,33): error TS2339: Property 'calculated_room' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/receiveRecord/index.vue(171,33): error TS2339: Property 'small_room' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/receiveRecord/index.vue(178,33): error TS2339: Property 'receiver_name' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/receiveRecord/index.vue(283,23): error TS7006: Parameter 'date' implicitly has an 'any' type. src/views/receiveRecord/index.vue(291,25): error TS7006: Parameter 'status' implicitly has an 'any' type. src/views/receiveRecord/index.vue(298,19): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/receiveRecord/index.vue(304,19): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/receiveRecord/index.vue(310,19): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/receiveRecord/index.vue(316,19): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/receiveRecord/index.vue(317,17): error TS2551: Property 'receiver_name' does not exist on type '{ car_plate_number: string; car_schedule_id: string; cargo_code: string; receive_name: string; limit: number; page: number; search_text: string; sort: string; sorts: string; start: number; state: string; time_condition: { ...; }[]; work_type: string; status: number; }'. Did you mean 'receive_name'? src/views/receiveRecord/index.vue(336,17): error TS2551: Property 'receiver_name' does not exist on type '{ car_plate_number: string; car_schedule_id: string; cargo_code: string; receive_name: string; limit: number; page: number; search_text: string; sort: string; sorts: string; start: number; state: string; time_condition: { ...; }[]; work_type: string; status: number; }'. Did you mean 'receive_name'? src/views/receiveRecord/index.vue(349,15): error TS2551: Property 'receiver_name' does not exist on type '{ car_plate_number: string; car_schedule_id: string; cargo_code: string; receive_name: string; limit: number; page: number; search_text: string; sort: string; sorts: string; start: number; state: string; time_condition: { ...; }[]; work_type: string; status: number; }'. Did you mean 'receive_name'? src/views/receiveRecord/index.vue(365,27): error TS2304: Cannot find name 'TabsPaneContext'. src/views/receiveRecord/index.vue(365,44): error TS6133: 'event' is declared but its value is never read. src/views/receiveRecord/index.vue(375,29): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/receiveRecord/index.vue(378,10): error TS2339: Property 'code' does not exist on type 'AxiosResponse<any, any>'. src/views/receiveRecord/index.vue(381,33): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/receiveRecord/index.vue(391,32): error TS7006: Parameter 'data' implicitly has an 'any' type. src/views/receiveRecord/index.vue(393,10): error TS2339: Property 'code' does not exist on type 'AxiosResponse<any, any>'. src/views/receiveRecord/index.vue(395,5): error TS2322: Type '{ label: unknown; value: unknown; }[]' is not assignable to type 'never[]'. Type '{ label: unknown; value: unknown; }' is not assignable to type 'never'. src/views/receiveRecord/index.vue(395,47): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/receiveRecord/index.vue(397,5): error TS2322: Type '{ label: unknown; value: unknown; }[]' is not assignable to type 'never[]'. Type '{ label: unknown; value: unknown; }' is not assignable to type 'never'. src/views/receiveRecord/index.vue(397,48): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/receiveRecord/index.vue(399,5): error TS2322: Type '{ label: unknown; value: unknown; }[]' is not assignable to type 'never[]'. Type '{ label: unknown; value: unknown; }' is not assignable to type 'never'. src/views/receiveRecord/index.vue(399,48): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/receiveRecord/index.vue(401,5): error TS2322: Type '{ label: unknown; value: unknown; }[]' is not assignable to type 'never[]'. Type '{ label: unknown; value: unknown; }' is not assignable to type 'never'. src/views/receiveRecord/index.vue(401,48): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/receiveRecord/index.vue(412,25): error TS6133: 'index' is declared but its value is never read. src/views/receiveRecord/index.vue(412,25): error TS7006: Parameter 'index' implicitly has an 'any' type. src/views/receiveRecord/index.vue(412,31): error TS7006: Parameter 'row' implicitly has an 'any' type. src/views/receiveRecord/index.vue(414,8): error TS2339: Property 'sap_room' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/receiveRecord/index.vue(415,8): error TS2339: Property 'calculated_room' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/receiveRecord/index.vue(416,8): error TS2339: Property 'small_room' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/receiveRecord/index.vue(417,8): error TS2339: Property 'receiver_name' does not exist on type '{ name: string; region: string; date1: string; date2: string; delivery: boolean; type: never[]; resource: string; desc: string; }'. src/views/receiveRecord/index.vue(420,23): error TS7006: Parameter 'index' implicitly has an 'any' type. src/views/receiveRecord/index.vue(420,29): error TS7006: Parameter 'row' implicitly has an 'any' type. src/views/receiveRecord/index.vue(436,26): error TS7006: Parameter 'warrantyDate' implicitly has an 'any' type. src/views/receiveRecord/index.vue(436,40): error TS7006: Parameter 'receiptDate' implicitly has an 'any' type. src/views/receiveRecord/index.vue(442,26): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. src/views/receiveRecord/index.vue(442,36): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. src/views/receiveRecord/receiveDetail.vue(14,19): error TS2339: Property 'cargo_code' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(18,55): error TS2339: Property 'car_schedule_id' does not exist on type '{}'. src/views/receiveRecord/receiveDetail.vue(19,56): error TS2339: Property 'cargo_name' does not exist on type '{}'. src/views/receiveRecord/receiveDetail.vue(20,68): error TS2339: Property 'gross_weight' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(21,56): error TS2339: Property 'car_plate_number' does not exist on type '{}'. src/views/receiveRecord/receiveDetail.vue(22,67): error TS2339: Property 'spec' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(23,57): error TS2339: Property 'warranty_start_date' does not exist on type '{}'. src/views/receiveRecord/receiveDetail.vue(23,88): error TS2339: Property 'warranty_start_date' does not exist on type '{}'. src/views/receiveRecord/receiveDetail.vue(23,126): error TS2339: Property 'warranty_end_date' does not exist on type '{}'. src/views/receiveRecord/receiveDetail.vue(23,155): error TS2339: Property 'warranty_end_date' does not exist on type '{}'. src/views/receiveRecord/receiveDetail.vue(24,68): error TS2339: Property 'cargo_code' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(25,67): error TS2339: Property 'net_weight' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(26,55): error TS2339: Property 'receiver_name' does not exist on type '{}'. src/views/receiveRecord/receiveDetail.vue(29,78): error TS2339: Property 'step_name' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(29,101): error TS2339: Property 'step_name' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(30,51): error TS2339: Property 'operator' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(31,52): error TS2339: Property 'create_time' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(32,51): error TS2339: Property 'car_plate_number' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(35,25): error TS7022: 'item' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. src/views/receiveRecord/receiveDetail.vue(35,33): error TS2448: Block-scoped variable 'item' used before its declaration. src/views/receiveRecord/receiveDetail.vue(105,33): error TS6133: 'ArrowRight' is declared but its value is never read. src/views/receiveRecord/receiveDetail.vue(109,1): error TS6133: 'log' is declared but its value is never read. src/views/receiveRecord/receiveDetail.vue(122,28): error TS7006: Parameter 'index' implicitly has an 'any' type. src/views/receiveRecord/receiveDetail.vue(124,14): error TS2339: Property 'schedule_step_info' does not exist on type '{}'. src/views/receiveRecord/receiveDetail.vue(124,37): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/receiveRecord/receiveDetail.vue(125,24): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. src/views/receiveRecord/receiveDetail.vue(127,26): error TS2339: Property 'step_info' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(127,40): error TS7006: Parameter 'item' implicitly has an 'any' type. src/views/receiveRecord/receiveDetail.vue(128,24): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. src/views/receiveRecord/receiveDetail.vue(132,29): error TS2339: Property 'step_name' does not exist on type 'never'. src/views/receiveRecord/receiveDetail.vue(135,3): error TS2554: Expected 2 arguments, but got 1. src/views/receiveRecord/receiveDetail.vue(140,22): error TS7006: Parameter 'tab' implicitly has an 'any' type. src/views/receiveRecord/receiveDetail.vue(140,27): error TS6133: 'event' is declared but its value is never read. src/views/receiveRecord/receiveDetail.vue(140,27): error TS7006: Parameter 'event' implicitly has an 'any' type. src/views/receiveRecord/receiveDetail.vue(144,26): error TS7006: Parameter 'id' implicitly has an 'any' type. src/views/receiveRecord/receiveDetail.vue(146,10): error TS2339: Property 'code' does not exist on type 'AxiosResponse<any, any>'. vite.config.ts(9,25): error TS2307: Cannot find module 'path' or its corresponding type declarations. vite.config.ts(34,20): error TS2304: Cannot find name '__dirname'. Build step 'Execute shell' marked build as failure SSH: Current build result is [FAILURE], not going to run. Finished: FAILURE
10-31
### 解析部署后模块找不到的解决方案 对于部署后出现 `Error: Cannot find module '@views/useTohandle/index'` 的问题,通常是因为路径解析或构建配置存在问题。以下是详细的分析和解决方法: #### 路径别名配置 确保 Webpack 或 Vite 中的路径别名配置正确无误。如果使用的是 Vue CLI,则需确认 `vue.config.js` 文件中的 alias 设置是否恰当。 ```javascript // vue.config.js module.exports = { configureWebpack: { resolve: { alias: { '@': path.resolve(__dirname, 'src') } } } } ``` 此设置使得 `@` 符号指向项目的 src 目录[^1]。 #### 生产环境下的懒加载处理 在开发环境中,动态导入可以正常工作;但在生产环境下,可能需要调整懒加载逻辑来适应不同的打包工具行为。一种常见的做法是在不同环境下分别采用同步引入与异步引入的方式。 ```javascript export const loadView = (view) => { if (process.env.NODE_ENV === 'development') { return (resolve) => require([`@/views/${view}`], resolve); } else { // 对于生产环境,建议继续沿用 import() 方式实现按需加载 return () => import(/* webpackChunkName: "[request]" */ `@/views/${view}`); } }; ``` 上述代码片段展示了如何根据不同环境选择合适的加载方式,在生产模式下通过 ES6 动态 `import()` 来支持更高效的代码分割[^4]。 #### 构建产物检查 仔细审查构建后的文件结构,特别是 dist 文件夹内的资源位置是否符合预期。有时候由于配置不当或其他原因,实际生成的结果并不匹配应用内部所期望的位置关系。 #### 清理缓存并重新编译 有时旧版本残留可能会干扰新版本的表现效果,尝试清理 node_modules 和清除 npm/yarn 缓存后再执行安装命令以及完整的 build 流程。 #### 更新依赖库至最新稳定版 保持使用的框架及相关插件处于最新的稳定状态有助于减少兼容性方面带来的潜在风险。 ---
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值