We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
System: OS: macOS Mojave 10.14.6 CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz Binaries: Node: 10.13.0 - /usr/local/bin/node Yarn: 1.17.3 - /usr/local/bin/yarn npm: 6.4.1 - /usr/local/bin/npm Browsers: Chrome: 86.0.4240.111 Edge: Not Found Firefox: Not Found Safari: 13.0.4 npmPackages: @vuepress/core: 1.7.1 @vuepress/theme-default: 1.7.1 vuepress: ^1.7.1 => 1.7.1 npmGlobalPackages: vuepress: Not Found
enhanceApp.js的内容如下:
export default ({ Vue, // VuePress 正在使用的 Vue 构造函数 options, // 附加到根实例的一些选项 router, // 当前应用的路由实例 siteData, // 站点元数据 isServer // 当前应用配置是处于 服务端渲染 或 客户端 }) => { router.beforeEach((to, from, next) => { }) }
当删除enhanceApp.js文件或者里面不写任何代码,能够正常生成html
能够正常将markdown文件渲染成html
assets的资源文件都生成了,比如css、img、js,一个HTML都没有生成,生成的日志中,没有出现success rendering html
npx vuepress info
rowboat-docs@1.0.0 docs:build /Users/chengming/Documents/好未来/轻舟/docs vuepress build .
wait Extracting site metadata... tip Apply theme @vuepress/theme-default ... tip Apply plugin container (i.e. "vuepress-plugin-container") ... tip Apply plugin @vuepress/register-components (i.e. "@vuepress/plugin-register-components") ... tip Apply plugin @vuepress/active-header-links (i.e. "@vuepress/plugin-active-header-links") ... tip Apply plugin @vuepress/search (i.e. "@vuepress/plugin-search") ... tip Apply plugin @vuepress/nprogress (i.e. "@vuepress/plugin-nprogress") ...
✔ Client Compiled successfully in 18.36s
✔ Server Compiled successfully in 14.53s
wait Rendering static HTML...
The text was updated successfully, but these errors were encountered:
问题已解决,原因是如下代码不能ssr
router.beforeEach((to, from, next) => { })
需要做个判断:
if (isServer) { router.beforeEach((to, from, next) => { }) }
Sorry, something went wrong.
I think use below is correct router.beforeEach((to, from, next) => { //xxx next() })
No branches or pull requests
System:
OS: macOS Mojave 10.14.6
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Binaries:
Node: 10.13.0 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Browsers:
Chrome: 86.0.4240.111
Edge: Not Found
Firefox: Not Found
Safari: 13.0.4
npmPackages:
@vuepress/core: 1.7.1
@vuepress/theme-default: 1.7.1
vuepress: ^1.7.1 => 1.7.1
npmGlobalPackages:
vuepress: Not Found
enhanceApp.js的内容如下:
当删除enhanceApp.js文件或者里面不写任何代码,能够正常生成html
Bug report
Steps to reproduce
What is expected?
能够正常将markdown文件渲染成html
What is actually happening?
assets的资源文件都生成了,比如css、img、js,一个HTML都没有生成,生成的日志中,没有出现success rendering html
Other relevant information
npx vuepress info
in my VuePress project:wait Extracting site metadata...
tip Apply theme @vuepress/theme-default ...
tip Apply plugin container (i.e. "vuepress-plugin-container") ...
tip Apply plugin @vuepress/register-components (i.e. "@vuepress/plugin-register-components") ...
tip Apply plugin @vuepress/active-header-links (i.e. "@vuepress/plugin-active-header-links") ...
tip Apply plugin @vuepress/search (i.e. "@vuepress/plugin-search") ...
tip Apply plugin @vuepress/nprogress (i.e. "@vuepress/plugin-nprogress") ...
✔ Client
Compiled successfully in 18.36s
✔ Server
Compiled successfully in 14.53s
wait Rendering static HTML...
The text was updated successfully, but these errors were encountered: