Yearning-gemini icon indicating copy to clipboard operation
Yearning-gemini copied to clipboard

master构建失败

Open luomoxu opened this issue 4 years ago • 2 comments

 ERROR  Failed to compile with 1 error                                                                                                                           

 error  in /data/wwwroot/Yearning-gemini/src/main.ts

ERROR in /data/wwwroot/Yearning-gemini/src/main.ts(41,18):
41:18 Object is possibly 'undefined'.
    39 | router.beforeEach((to, from, next) => {
    40 |     LoadingBar.start();
  > 41 |     config.title(to.meta.title);
       |                  ^
    42 |     if (sessionStorage.getItem('locking') === '1' && to.name !== 'locking') { // 判断当前是否是锁定状态
    43 |         next(false);
    44 |         router.replace({name: 'login'}).then(() => {

 ERROR  Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `vue-cli-service build`
npm ERR! Exit status 1

luomoxu avatar Aug 13 '21 08:08 luomoxu

/data/wwwroot/Yearning-gemini/src/main.ts 39行改下 router.beforeEach((to: any, from, next)

xujianfei9527 avatar Aug 16 '21 01:08 xujianfei9527

/data/wwwroot/Yearning-gemini/src/main.ts 39行改下 router.beforeEach((to: any, from, next)

这是什么原理?

AntarcticPresident avatar Mar 22 '22 09:03 AntarcticPresident