vitepress icon indicating copy to clipboard operation
vitepress copied to clipboard

ReferenceError: Cannot access 'B' before initialization

Open ytattn009 opened this issue 1 year ago • 4 comments

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

ytattn009 avatar Jul 26 '24 02:07 ytattn009

Please provide a minimal reproducible example using https://vitepress.new or a github repository. There is a likely a circular reference.

brc-dd avatar Jul 26 '24 03:07 brc-dd

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

  1. npm i vitepress

  2. npm vitepress init

  3. open config.mts, add nav items. nav: [ { text: 'Home', link: '/' }, { text: 'Examples', items: [ { text: 'Examples`', link: '/' }] } ],

  4. npm run docs:build

  5. npm run docs:preview

  6. npm i vitepress

  7. npm vitepress init

  8. open config.mts, add nav items. nav: [ { text: 'Home', link: '/' }, { text: 'Examples', items: [ { text: 'Examples`', link: '/' }] } ],

  9. npm run docs:build

  10. npm run docs:preview

ytattn009 avatar Jul 26 '24 07:07 ytattn009

2024-07-26 152104

ytattn009 avatar Jul 26 '24 07:07 ytattn009

There isn't any such error with the steps you mentioned. Please create a repo with that content and share a link here.

brc-dd avatar Jul 26 '24 10:07 brc-dd