Skip to content

[Bug report] Some old import from @vuepress/client and @vuepress/utils not work #1485

Closed as not planned

Description

@lsy-404

Description

I updated from 2.0.0-beta.177 to the latest version and encountered problems with path (import { path } from '@vuepress/utils';) and usePageFrontmatter (import { usePageFrontmatter } from "@vuepress/ client";) are introduced and used for issues.
My repository is https://github.com/TCA-Arknights/aneot-1.3Alpha, old one is https://github.com/TCA-Arknights/aneot(it work)
My site has an animation of a large screen on the front page (aneot.terrach.net) which is achieved by replacing the original image. After this update I can't find the above two items to import, resulting in the settings in config.ts and .vuepress\components\MyBlogHero.vue not working properly (there are also two ts files under .vuepress\components\frontmatter in the dependencies).
I already know that the above two are merged into the vuepress ontology, but I can't find and use it properly.
Can anyone help me?

Reproduction

https://github.com/TCA-Arknights/aneot-1.3Alpha

Used Package Manager

pnpm

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-11300H @ 3.10GHz
    Memory: 5.02 GB / 23.79 GB
  Binaries:
    Node: 18.17.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 9.8.1 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.6.12 - ~\AppData\Roaming\npm\pnpm.CMD
    bun: Not Found
  Utilities:
    Git: 2.41.0.
  Browsers:
    Chrome: Not Found
    Edge: Chromium (121.0.2277.98)
  npmPackages:
    @vuepress/bundler-vite: 2.0.0-rc.2 => 2.0.0-rc.2
    @vuepress/bundler-webpack: Not Found
    @vuepress/cli: Not Found
    @vuepress/client: Not Found
    @vuepress/core: Not Found
    @vuepress/markdown: Not Found
    @vuepress/shared: Not Found
    @vuepress/utils: Not Found
    vue: ^3.4.15 => 3.4.15
    vue-router: Not Found
    vuepress: 2.0.0-rc.2 => 2.0.0-rc.2

Activity

  1. Mister-Hope commented on Feb 4, 2024

    @Mister-Hope
    Member

    Just use vuepress/xxx intead of @vuepress/xxx. This ensures you only have once single pkg @vuepress/xxx in all plugins, theme and your codes.

    Provide a minimal reproduction describing your challenge while upgrading helps me to give the correct suggestions. I don't want to dig into a whole project. Just create a new project with create-vuepress and migrate some codes to it for a demo.

  2. locked and limited conversation to collaborators on Feb 4, 2024
  3. converted this issue into a discussion #1486 on Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions