You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am developing a theme, when I call usePageFrontmatter, usePageHead and other methods in the theme, it will report Uncaught (in promise) Error: useXX() is called without provider. After debugging, I found that if I modify something like this, it will be normal
System:
OS: macOS 11.6.5
CPU: (12) x64 Genuine Intel(R) CPU 0000 @ 2.90GHz
Memory: 322.52 MB / 32.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
Yarn: 1.22.18 - /usr/local/bin/yarn
npm: 8.5.2 - ~/.nvm/versions/node/v16.13.0/bin/npm
Utilities:
Git: 2.36.0 - /usr/local/bin/git
Browsers:
Chrome: 101.0.4951.64
Edge: Not Found
Firefox: 99.0.1
Safari: 15.4
npmPackages:
@vuepress/bundler-vite: Not Found
@vuepress/bundler-webpack: Not Found
@vuepress/cli: Not Found
@vuepress/client: ^2.0.0-beta.43 => 2.0.0-beta.43
@vuepress/core: Not Found
@vuepress/markdown: Not Found
@vuepress/plugin-active-header-links: Not Found
@vuepress/plugin-back-to-top: Not Found
@vuepress/plugin-container: Not Found
@vuepress/plugin-docsearch: Not Found
@vuepress/plugin-external-link-icon: Not Found
@vuepress/plugin-git: Not Found
@vuepress/plugin-google-analytics: Not Found
@vuepress/plugin-medium-zoom: Not Found
@vuepress/plugin-nprogress: Not Found
@vuepress/plugin-palette: Not Found
@vuepress/plugin-prismjs: Not Found
@vuepress/plugin-pwa: Not Found
@vuepress/plugin-pwa-popup: Not Found
@vuepress/plugin-register-components: Not Found
@vuepress/plugin-search: Not Found
@vuepress/plugin-shiki: Not Found
@vuepress/plugin-theme-data: Not Found
@vuepress/plugin-toc: Not Found
@vuepress/shared: Not Found
@vuepress/theme-default: Not Found
@vuepress/utils: Not Found
vue: ^3.2.33 => 3.2.33
vue-loader: Not Found
vue-router: Not Found
vuepress: ^2.0.0-beta.43 => 2.0.0-beta.43
vuepress-vite: Not Found
vuepress-webpack: Not Found
The text was updated successfully, but these errors were encountered:
Yes, the reason is that I divided the theme and the test into two different projects and found that they each had @vuepress/client installed, albeit the same version
I synthesized a project and now it's normal, it's great
Description
I am developing a theme, when I call usePageFrontmatter, usePageHead and other methods in the theme, it will report Uncaught (in promise) Error: useXX() is called without provider. After debugging, I found that if I modify something like this, it will be normal
Everything works fine
Reproduction
Development...
Used Package Manager
pnpm
System Info
The text was updated successfully, but these errors were encountered: