Open jchalex opened 2 years ago
I have the same problem here - with 2.0.0-beta.45
Same here with ^2.0.0-beta.46
Same here with ^2.0.0-beta.46
pnpm add vuepress@next--> devDependencies:
i solve it in my project.
@vuepress/client 2.0.0-beta.46-->@vuepress/client 2.0.0-beta.45 .
❯ pnpm add -D @vuepress/client@2.0.0-beta.45
Packages: +2 -2
++--
Progress: resolved 659, reused 640, downloaded 0, added 0, done
devDependencies:
- @vuepress/client 2.0.0-beta.46
+ @vuepress/client 2.0.0-beta.45
- vuepress 2.0.0-beta.46
+ vuepress 2.0.0-beta.46
and It works successfully!
when i development my vuepress-theme, i have the same error with using useRouteLocale
in my Vue SFC, whether @vuepress/client 2.0.0-beta.45 or @vuepress/client 2.0.0-beta.46 with vuepress@2.0.0-beta.46
Such errors are usually caused by incorrectly containing multiple versions of @vue/xxx, @vuepress/xxx, vue or vue-router in the project.Make sure you are using the latest vuepress and vuepress-plugins and theme versions
使用 @vuepress/plugin-docsearch@next 遇到同样的问题。
yarn upgrade-interactive
makes it work.
const { searchPlugin } = require('@vuepress/plugin-search')
module.exports = {
plugins: [
searchPlugin({
// options
}),
],
}
when it shows an error, just run 'npm update' it works for me.
ts(6133)&ts(2307)
You need to install the same version of searchPlugin as vuepress to run normally.
And check whether there is such a statement. For me, it is generated automatically when I install it automatically, which will lead to incorrect mapping of pnpm to search plugin
"pnpm": "link:@vuepress/plugin-search"
Installation command
pnpm add -D @vuepress/plugin-search@2.0.0-beta.43
config.ts
plugins: [
// @ts-ignore
localeRedirectPlugin(),
backToTopPlugin(),
nprogressPlugin(),
mediumZoomPlugin({
delay: 50 //切换路由后开始生效的延迟时间
}),
searchPlugin({
maxSuggestions : 7,
//将首页排除出可搜索名单
isSearchable: (page) => page.path !== '/',
locales: {
'/en/': {
placeholder: 'Search',
},
'/zh/': {
placeholder: '搜索',
},
'/jp/': {
placeholder: '検索',
},
},
}),
],
package.json
`"devDependencies": {
"@kecrily/eslint-config": "^0.1.3",
"@vuepress/client": "^2.0.0-beta.43",
"@vuepress/plugin-search": "2.0.0-beta.43",
"eslint": "^8.15.0",
"postcss": "^8.4.13",
"typescript": "^4.6.4",
"vue": "^3.2.33",
"vuepress": "2.0.0-beta.43",
"vuepress-plugin-locale-redirect": "^1.0.1"
},
Bug report
Steps to reproduce
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?
Other relevant information
npx vuepress info
in my VuePress project: