[other] 求助:vitepress部署个人文档遇到问题
Tofloor
poster avatar
hanzn-zzx
deepin
2024-02-14 17:05
Author

用vitepress部署个人文档站,结果无论咋搞都过不了pages,本地预览也出bug

把执行时的错误代码贴上来了,还请哪位大佬能帮下忙……

搞了一中午了……sad

仓库地址在https://gitlab.com/hanzn-zzx/doc/

感谢大佬们!!!

$ npm install
npm WARN deprecated [email protected]: Package no longer supported. Please use the vue package instead. Contact [email protected] for more info.
added 81 packages, and audited 82 packages in 15s
10 packages are looking for funding
  run `npm fund` for details
found 0 vulnerabilities
$ npm run docs:build
> docs:build
> vitepress build docs
  vitepress v1.0.0-rc.42
▲ [WARNING] Duplicate key "outlineTitle" in object literal [duplicate-object-key]
    docs/.vitepress/config.mts:40:1:
      40 │   outlineTitle: '大纲',
         ╵   ~~~~~~~~~~~~
  The original key "outlineTitle" is here:
    docs/.vitepress/config.mts:30:2:
      30 │   outlineTitle: '大纲',
         ╵   ~~~~~~~~~~~~
- building client + server bundles...
✓ building client + server bundles...
- rendering pages...
✖ rendering pages...
build error:
TypeError: Cannot read properties of undefined (reading 'some')
    at isChildActive (file:///builds/hanzn-zzx/doc/docs/.vitepress/.temp/app.js?t=1707901032590:3016:30)
    at file:///builds/hanzn-zzx/doc/docs/.vitepress/.temp/app.js?t=1707901032590:3019:43
    at ReactiveEffect.fn (/builds/hanzn-zzx/doc/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js:927:13)
    at ReactiveEffect.run (/builds/hanzn-zzx/doc/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js:162:19)
    at get value [as value] (/builds/hanzn-zzx/doc/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js:939:109)
    at file:///builds/hanzn-zzx/doc/docs/.vitepress/.temp/app.js?t=1707901032590:3028:31
    at renderComponentSubTree (/builds/hanzn-zzx/doc/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js:430:9)
    at renderComponentVNode (/builds/hanzn-zzx/doc/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js:376:12)
    at ssrRenderComponent (/builds/hanzn-zzx/doc/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js:84:10)
    at file:///builds/hanzn-zzx/doc/docs/.vitepress/.temp/app.js?t=1707901032590:3058:19
Reply Favorite View the author
All Replies
把一切操作变成GUI
deepin
Backbone of ecological co-construction group
2024-02-14 17:57
#1

vuejs 包已经过时了不支持。你试试 npm uninstall vuejsnpm install vue 来更新你的包。

TypeError: Cannot read properties of undefined (reading 'some') 错误可能是由于您的路由配置中有一个未定义的子路由,或者您的主题组件中有一个未定义的属性。检查你的路由和组件,确保没有漏或错误的引用。

Reply View the author
hanzn-zzx
deepin
2024-02-14 21:21
#2
把一切操作变成GUI

vuejs 包已经过时了不支持。你试试 npm uninstall vuejsnpm install vue 来更新你的包。

TypeError: Cannot read properties of undefined (reading 'some') 错误可能是由于您的路由配置中有一个未定义的子路由,或者您的主题组件中有一个未定义的属性。检查你的路由和组件,确保没有漏或错误的引用。

谢谢!解决了~

Reply View the author