vuepress / core

Vue-Powered Static Site Generator
https://vuepress.vuejs.org
MIT License
2.17k stars 922 forks source link

[Bug report] Error: useClientData() is called without provider. #1511

Closed Nejoe closed 3 months ago

Nejoe commented 3 months ago

Description

I'm following the v2.0 quick start tutorial, but when I deployed it to github.io through workflow, it comes error useClientData() is called without provider. here

Reproduction

https://github.com/Nejoe/remember11-site

Used Package Manager

yarn

System Info

System:
    OS: Windows 11 10.0.22621
    CPU: (12) x64 AMD Ryzen 5 5600X 6-Core Processor
    Memory: 5.94 GB / 15.93 GB
  Binaries:
    Node: 18.17.1 - ~\AppData\Local\Temp\yarn--1709933067177-0.8521665918670298\node.CMD
    Yarn: 1.22.21 - ~\AppData\Local\Temp\yarn--1709933067177-0.8521665918670298\yarn.CMD
    npm: 9.8.1 - C:\Program Files\nodejs\npm.CMD
    pnpm: Not Found
    bun: Not Found
  Utilities:
    Git: 2.42.0.
  Browsers:
    Chrome: Not Found
    Edge: Chromium (122.0.2365.66)
  npmPackages:
    @vuepress/bundler-vite: ^2.0.0-rc.7 => 2.0.0-rc.7
    @vuepress/bundler-webpack: Not Found
    @vuepress/cli:  2.0.0-rc.8
    @vuepress/client:  2.0.0-rc.7 (2.0.0-rc.8)
    @vuepress/core:  2.0.0-rc.8 (2.0.0-rc.7)
    @vuepress/markdown:  2.0.0-rc.8 (2.0.0-rc.7)
    @vuepress/shared:  2.0.0-rc.8 (2.0.0-rc.7)
    @vuepress/utils:  2.0.0-rc.8 (2.0.0-rc.7)
    vue: ^3.4.0 => 3.4.21
    vue-router:  4.3.0
    vuepress: ^2.0.0-rc.8 => 2.0.0-rc.8
Mister-Hope commented 3 months ago

obviously your project are mixing rc7 and rc8

Unify them to a single version and try again.

BTW, is this exactly the create helper generate for you?

Nejoe commented 3 months ago

obviously your project are mixing rc7 and rc8

Unify them to a single version and try again.

BTW, is this exactly the create helper generate for you?

Thanks! It seems I upgraded the package somehow, it's working now