-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
type: bugSomething isn't workingSomething isn't working
Description
- I confirm that this is an issue rather than a question.
Bug report
Steps to reproduce
- Set up custom theme.
- Use router exposed in enhanceApp.js for registering global navigation guard.
- Implement redirection by invoking guard's
next()
handler with URL. - Run
vuepress build
.
Actual repro: https://github.com/soletan/vue-router-test
What is expected?
Build should succeed.
What is actually happening?
Build fails due to some pageMeta being undefined. In addition there are unhandled promise rejections logged as errors.
Other relevant information
Output of npx vuepress info
in my VuePress project:
Environment Info:
System:
OS: Windows 10 10.0.19041
CPU: (8) x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
Binaries:
Node: 12.16.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.4 - ~\AppData\Roaming\npm\yarn.CMD
npm: 6.14.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 85.0.4183.102
Edge: Spartan (44.19041.423.0), Chromium (85.0.564.44)
npmPackages:
@vuepress/core: 1.5.4
@vuepress/theme-default: 1.5.4
vuepress: ^1.5.4 => 1.5.4
npmGlobalPackages:
vuepress: Not Found
- My analysis: https://stackoverflow.com/questions/63351479/vuepress-build-docs-get-referenceerror-pagemeta-is-not-defined
- some related issue in vue-router: Error: Redirected from X to Y via a navigation guard. vue-router#3221
- the actual change: vuejs/vue-router@4c727f9#diff-feafce5e816936212eccd6808c5421a6R176
- working fix: downgrading vue-router to 3.1.6 explicitly by using ~3.1.3 instead of ^3.1.3 in your dependencies
Metadata
Metadata
Assignees
Labels
type: bugSomething isn't workingSomething isn't working