[Bug report] Build shows multiple 'Error: usePageFrontmatter() is called without provider.' messages
See original GitHub issue✅ Checklist
- I am using the latest version
🔎 Description
Concise Description
When executing the npm run build command it completes successfully, however it shows multiple times the following message:
Rendering pages⠋ Rendering pages /Error: usePageFrontmatter() is called without provider. at usePageFrontmatter (C:\code\vue-press-poc\src\.vuepress\.temp\.server\app.js:309:11) at setupSidebarItems (C:\code\vue-press-poc\src\.vuepress\.temp\.server\app.js:1806:23) at Object.setup (C:\code\vue-press-poc\src\.vuepress\.temp\.server\app.js:2606:5) at setup (C:\code\vue-press-poc\src\.vuepress\.temp\.server\app.js:2749:59) at callWithErrorHandling (C:\code\vue-press-poc\node_modules\@vue\runtime-core\dist\runtime-core.cjs.prod.js:119:22) at setupStatefulComponent (C:\code\vue-press-poc\node_modules\@vue\runtime-core\dist\runtime-core.cjs.prod.js:5783:29) at setupComponent (C:\code\vue-press-poc\node_modules\@vue\runtime-core\dist\runtime-core.cjs.prod.js:5764:11) at renderComponentVNode (C:\code\vue-press-poc\node_modules\@vue\server-renderer\dist\server-renderer.cjs.prod.js:169:17) at Object.renderToString (C:\code\vue-press-poc\node_modules\@vue\server-renderer\dist\server-renderer.cjs.prod.js:443:26) at renderPage (C:\code\vue-press-poc\node_modules\@vuepress\bundler-vite\lib\build\renderPage.js:20:63)
As a result the site won’t show. Using the npm run dev command does not show the messages and the site does show in the browser. Occasionally the console shows the same error though and usually a page refresh fixes this.
Expected behavior
Steps to reproduce
Screenshots or Screen Recording (if possible)
📄 Environment info (npx vuepress info
)
System:
OS: Windows 10 10.0.22000
CPU: (8) x64 Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
Memory: 7.25 GB / 15.60 GB
Binaries:
Node: 14.18.0 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 6.14.15 - C:\Program Files\nodejs\npm.CMD
Utilities:
Git: 2.35.1.
Browsers:
Chrome: Not Found
Edge: Spartan (44.22000.120.0), Chromium (101.0.1210.53)
npmPackages:
@vuepress/bundler-vite: 2.0.0-beta.45
@vuepress/bundler-webpack: Not Found
@vuepress/cli: 2.0.0-beta.45
@vuepress/client: 2.0.0-beta.45
@vuepress/core: 2.0.0-beta.45
@vuepress/markdown: 2.0.0-beta.45
@vuepress/plugin-active-header-links: 2.0.0-beta.45
@vuepress/plugin-back-to-top: 2.0.0-beta.45
@vuepress/plugin-container: 2.0.0-beta.45
@vuepress/plugin-docsearch: Not Found
@vuepress/plugin-external-link-icon: 2.0.0-beta.45
@vuepress/plugin-git: 2.0.0-beta.45
@vuepress/plugin-google-analytics: 2.0.0-beta.45
@vuepress/plugin-medium-zoom: 2.0.0-beta.45
@vuepress/plugin-nprogress: 2.0.0-beta.45
@vuepress/plugin-palette: 2.0.0-beta.45
@vuepress/plugin-prismjs: 2.0.0-beta.45
@vuepress/plugin-pwa: 2.0.0-beta.45
@vuepress/plugin-pwa-popup: 2.0.0-beta.45
@vuepress/plugin-register-components: Not Found
@vuepress/plugin-search: Not Found
@vuepress/plugin-shiki: Not Found
@vuepress/plugin-theme-data: 2.0.0-beta.45
@vuepress/plugin-toc: Not Found
@vuepress/shared: 2.0.0-beta.45
@vuepress/theme-default: 2.0.0-beta.45
@vuepress/utils: 2.0.0-beta.45
vue: 3.2.34
vue-loader: Not Found
vue-router: 4.0.15
vuepress: ^2.0.0-beta.45 => 2.0.0-beta.45
vuepress-vite: undefined (2.0.0-beta.45)
vuepress-webpack: Not Found
🔗 Reproduction link / repo:
No response
Issue Analytics
- State:
- Created a year ago
- Comments:9 (4 by maintainers)
Top GitHub Comments
@mveenman @zhang13pro Hi, the latest theme version (2.0.0-alpha.24) should be compatible with VuePress v2.0.0-beta.46, please have a try. Thanks!
@Renovamen tested an can confirm this worked. I’ve also added an
engines
section to mypackage.json
in order to make the CI/CD pipeline use at least Node version 15. Closing the bug, thank you for the support.