Skip to content

@vuepress/plugin-search: Uncaught (in promise) Error: useRouteLocale() is called without provider. #3040

@jchalex

Description

@jchalex
  • I confirm that this is an issue rather than a question.

Bug report

Steps to reproduce

module.exports = {
...
plugins: [
    backToTopPlugin(),
    mediumZoomPlugin({}),
    nprogressPlugin(),
    searchPlugin({}),
  ],
  ...
};

And the whole page is empty, which can not loading correct.

What is expected?

Expecting a search box in the navigation, page loading correct.

What is actually happening?

image

image

Other relevant information

"devDependencies": {
    "@vuepress/bundler-vite": "^2.0.0-beta.41",
    "@vuepress/plugin-back-to-top": "^2.0.0-beta.41",
    "@vuepress/plugin-docsearch": "^2.0.0-beta.41",
    "@vuepress/plugin-medium-zoom": "^2.0.0-beta.41",
    "@vuepress/plugin-nprogress": "^2.0.0-beta.41",
    "@vuepress/plugin-register-components": "^2.0.0-beta.43",
    "@vuepress/plugin-search": "^2.0.0-beta.43",
    "@vuepress/theme-default": "^2.0.0-beta.41",
    "vuepress": "^2.0.0-beta.41"
  }
  • Output of npx vuepress info in my VuePress project:
System:
    OS: macOS 11.4
    CPU: (8) x64 Apple M1
    Memory: 22.80 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.0 - /usr/local/bin/node
    Yarn: Not Found
    npm: 8.4.1 - /usr/local/bin/npm
  Utilities:
    Git: 2.30.1 - /usr/bin/git
  Browsers:
    Chrome: 101.0.4951.54
    Edge: Not Found
    Firefox: 92.0
    Safari: 14.1.1
  npmPackages:
    @vuepress/bundler-vite: ^2.0.0-beta.41 => 2.0.0-beta.41 
    @vuepress/bundler-webpack: Not Found
    @vuepress/cli:  2.0.0-beta.41 
    @vuepress/client:  2.0.0-beta.41 (2.0.0-beta.43)
    @vuepress/core:  2.0.0-beta.41 (2.0.0-beta.43)
    @vuepress/markdown:  2.0.0-beta.41 (2.0.0-beta.43)
    @vuepress/plugin-active-header-links:  2.0.0-beta.41 
    @vuepress/plugin-back-to-top: ^2.0.0-beta.41 => 2.0.0-beta.41 
    @vuepress/plugin-container:  2.0.0-beta.41 
    @vuepress/plugin-docsearch: ^2.0.0-beta.41 => 2.0.0-beta.41 
    @vuepress/plugin-external-link-icon:  2.0.0-beta.41 
    @vuepress/plugin-git:  2.0.0-beta.41 
    @vuepress/plugin-google-analytics: Not Found
    @vuepress/plugin-medium-zoom: ^2.0.0-beta.41 => 2.0.0-beta.41 
    @vuepress/plugin-nprogress: ^2.0.0-beta.41 => 2.0.0-beta.41 
    @vuepress/plugin-palette:  2.0.0-beta.41 
    @vuepress/plugin-prismjs:  2.0.0-beta.41 
    @vuepress/plugin-pwa: Not Found
    @vuepress/plugin-pwa-popup: Not Found
    @vuepress/plugin-register-components: ^2.0.0-beta.43 => 2.0.0-beta.43 
    @vuepress/plugin-search: ^2.0.0-beta.43 => 2.0.0-beta.43 
    @vuepress/plugin-shiki: Not Found
    @vuepress/plugin-theme-data:  2.0.0-beta.41 
    @vuepress/plugin-toc: Not Found
    @vuepress/shared:  2.0.0-beta.41 (2.0.0-beta.43)
    @vuepress/theme-default: ^2.0.0-beta.41 => 2.0.0-beta.41 
    @vuepress/utils:  2.0.0-beta.41 (2.0.0-beta.43)
    vue:  3.2.33 
    vue-loader: Not Found
    vue-router:  4.0.14 
    vuepress: ^2.0.0-beta.41 => 2.0.0-beta.41 
    vuepress-vite:  2.0.0-beta.41 
    vuepress-webpack: Not Found

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