vitepress
vitepress copied to clipboard
ReferenceError: Cannot access 'B' before initialization
Describe the bug
项目打包部署后导航菜单不可用,控制台报错 framework.D6fyXT9h.js:13 Uncaught ReferenceError: Cannot access 'B' before initialization at Qr (framework.D6fyXT9h.js:13:5534) at theme.C-4cHeO8.js:1:460
Reproduction
项目打包部署后导航菜单不可用,控制台报错 framework.D6fyXT9h.js:13 Uncaught ReferenceError: Cannot access 'B' before initialization at Qr (framework.D6fyXT9h.js:13:5534) at theme.C-4cHeO8.js:1:460
Expected behavior
项目打包部署后导航菜单不可用,控制台报错 framework.D6fyXT9h.js:13 Uncaught ReferenceError: Cannot access 'B' before initialization at Qr (framework.D6fyXT9h.js:13:5534) at theme.C-4cHeO8.js:1:460
System Info
window11,
npm:8.19.4,
{
"markdown-it-mathjax3": "^4.3.2",
"markdown-to-text": "^0.1.1",
"vitepress": "^1.3.1",
"vitepress-markdown-timeline": "^1.2.1"
}
MS Edge
Additional context
No response
Validations
- [X] Check if you're on the latest VitePress version.
- [X] Follow our Code of Conduct
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Please provide a minimal reproducible example using https://vitepress.new or a github repository. There is a likely a circular reference.
Please provide a minimal reproducible example using https://vitepress.new or a github repository. There is a likely a circular reference.
you can start a new project
-
npm i vitepress
-
npm vitepress init
-
open config.mts, add nav items. nav: [ { text: 'Home', link: '/' }, { text: 'Examples', items: [ { text: 'Examples`', link: '/' }] } ],
-
npm run docs:build
-
npm run docs:preview
-
npm i vitepress
-
npm vitepress init
-
open config.mts, add nav items. nav: [ { text: 'Home', link: '/' }, { text: 'Examples', items: [ { text: 'Examples`', link: '/' }] } ],
-
npm run docs:build
-
npm run docs:preview
There isn't any such error with the steps you mentioned. Please create a repo with that content and share a link here.