vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
11.48k stars 1.86k forks source link

build error: TypeError: _ctx.a is not a function #3728

Closed Linhieng closed 1 month ago

Linhieng commented 1 month ago

Describe the bug

build error: TypeError: _ctx.a is not a function.

image

Reproduction

You can paste the follow txt in the markdown:

$S_n = \frac{{a(1 - r^n)}}{{1 - r}}$

and you will recevied a build error.

But, other Math Equations can normally build, like:

$S_N$

Expected behavior

Normal output page, even if it does not render mathematical formulas.

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (12) x64 AMD Ryzen 5 4600H with Radeon Graphics
    Memory: 6.04 GB / 15.37 GB
  Binaries:
    Node: 20.11.1 - C:\Program Files\nodejs\node.EXE
    npm: 10.5.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.15.5 - C:\Program Files\nodejs\pnpm.CMD
  Browsers:
    Edge: Chromium (123.0.2420.65)
    Internet Explorer: 11.0.19041.3636
  npmPackages:
    vitepress: ^1.0.1 => 1.0.1

Additional context

When I follow the step of math-equations - docs the error disappeared.

Validations

Linhieng commented 1 month ago

You can see the detail in my github action#3:

image

brc-dd commented 1 month ago

https://vitepress.dev/guide/using-vue#escaping

You can add something like this if you don't want to use vue interpolation in inline code ever - https://github.com/vuejs/vitepress/discussions/3724#discussioncomment-8963669