Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

master构建失败 #13

Open
luomoxu opened this issue Aug 13, 2021 · 2 comments
Open

master构建失败 #13

luomoxu opened this issue Aug 13, 2021 · 2 comments

Comments

@luomoxu
Copy link

luomoxu commented Aug 13, 2021

 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
@xujianfei9527
Copy link

xujianfei9527 commented Aug 16, 2021

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

@AntarcticPresident
Copy link

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

这是什么原理?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants