beta171 版本 auto-catalog 打包失败,可能是上游错误? #2740
-
在多个仓库测试均能稳定复现。使用 Webpack 和 Vite 打包均失败,在 beta170 也失败,beta169 没有此错误。 在多次测试中,一些版本的组合(Vue 和 VuePress 版本)可触发 最近一次复现是 我的模板仓库 中的 错误为:
我的环境是,默认主题: {
"name": "vuepress-solid-template",
"version": "1.0.0",
"description": "Best Vuepress Template",
"main": "index.js",
"scripts": {
"dev": "vuepress dev docs",
"build": "vuepress build docs",
"build:webpack": "vuepress-webpack build docs",
"clean-dev": "vuepress dev docs --clean-cache",
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs",
"docs:build:webpack": "vuepress-webpack build docs",
"docs:clean-dev": "vuepress dev docs --clean-cache",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@vuepress/client": "2.0.0-beta.60",
"sass-loader": "^13.2.0",
"vue": "^3.2.47",
"vuepress": "2.0.0-beta.60",
"vuepress-plugin-auto-catalog": "2.0.0-beta.171",
"vuepress-plugin-copy-code2": "2.0.0-beta.171",
"vuepress-plugin-md-enhance": "2.0.0-beta.171",
"vuepress-plugin-search-pro": "2.0.0-beta.171",
"vuepress-webpack": "2.0.0-beta.60",
"webpack": "5.0.0"
}
} 经过测试,错误指向了 这行代码( const route = useRoute();
const router = useRouter();
const getCatalogInfo = (): CatalogInfo[] => {
const base = props.base || route.path.replace(/\/[^/]+$/, "/");
const routes = router.getRoutes();
const result: CatalogInfo[] = [];
} 构建时 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Are you sure that ONLY ONE VERSION of vue and vue-router exisits in your lock file? Also talk is cheap, a failing reproduction is better than 10k words. Update: Leaving as your lock file is invalid. Update 2: SO what else can I do besides: |
Beta Was this translation helpful? Give feedback.
Are you sure that ONLY ONE VERSION of vue and vue-router exisits in your lock file?
Also talk is cheap, a failing reproduction is better than 10k words.
Update:
Leaving as your lock file is invalid.
Update 2: SO what else can I do besides: