vuejs / vitepress

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

New build error with 1.1.1 #3808

Closed UnrefinedBrain closed 4 weeks ago

UnrefinedBrain commented 4 weeks ago

Describe the bug

When upgrading from 1.1.0 to 1.1.1, my vitepress site fails to build with the error:

vitepress v1.1.1

- building client + server bundles...
x Build failed in 3.78s
βœ– building client + server bundles...
build error:
SyntaxError: Element is missing end tag.
    at createCompilerError (/home/runner/work/vue-metamorph/vue-metamorph/node_modules/.pnpm/@vue+compiler-core@3.4.23/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js:1325:17)
    at emitError (/home/runner/work/vue-metamorph/vue-metamorph/node_modules/.pnpm/@vue+compiler-core@3.4.23/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js:2794:5)
    at Object.onclosetag (/home/runner/work/vue-metamorph/vue-metamorph/node_modules/.pnpm/@vue+compiler-core@3.4.23/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js:2182:13)
    at Tokenizer.stateInClosingTagName (/home/runner/work/vue-metamorph/vue-metamorph/node_modules/.pnpm/@vue+compiler-core@3.4.23/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js:749:16)
    at Tokenizer.parse (/home/runner/work/vue-metamorph/vue-metamorph/node_modules/.pnpm/@vue+compiler-core@3.4.23/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js:1107:16)
    at Object.baseParse (/home/runner/work/vue-metamorph/vue-metamorph/node_modules/.pnpm/@vue+compiler-core@3.4.23/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js:2826:13)
    at Object.parse (/home/runner/work/vue-metamorph/vue-metamorph/node_modules/.pnpm/@vue+compiler-dom@3.4.23/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js:633:23)
    at Object.parse$2 [as parse] (/home/runner/work/vue-metamorph/vue-metamorph/node_modules/.pnpm/@vue+compiler-sfc@3.4.23/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:1853:24)
    at createDescriptor (file:///home/runner/work/vue-metamorph/vue-metamorph/node_modules/.pnpm/@vitejs+plugin-vue@5.0.4_vite@5.2.9_vue@3.4.23/node_modules/@vitejs/plugin-vue/dist/index.mjs:74:[43](https://github.com/UnrefinedBrain/vue-metamorph/actions/runs/8737437266/job/23974421388?pr=68#step:8:44))
    at transformMain (file:///home/runner/work/vue-metamorph/vue-metamorph/node_modules/.pnpm/@vitejs+plugin-vue@5.0.4_vite@5.2.9_vue@3.4.23/node_modules/@vitejs/plugin-vue/dist/index.mjs:2367:34)

Reproduction

https://github.com/UnrefinedBrain/vue-metamorph/actions/runs/8737437266/job/23974421388?pr=68

  1. clone vue-metamorph
  2. checkout the dependabot/npm_and_yarn/development-dependencies-abea8692ad branch
  3. pnpm i && pnpm docs:build
  4. see error

Expected behavior

build should succeed like in 1.1.0

System Info

happens everywhere, but this is my local envinfo

β†’ npx envinfo --system --npmPackages vitepress --binaries --browsers

  System:
    OS: Linux 6.1 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
    CPU: (4) x64 Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz
    Memory: 19.65 GB / 31.24 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.1/bin/npm
    pnpm: 8.15.4 - ~/.nvm/versions/node/v20.11.1/bin/pnpm
  npmPackages:
    vitepress: 1.1.1 => 1.1.1 

Additional context

The same code builds successfully on vitepress 1.1.0

Validations

brc-dd commented 4 weeks ago

You have code like this in your cli.md file - --files \<glob> which is invalid vue πŸ‘€

UnrefinedBrain commented 4 weeks ago

Oh I see, that's probably a difference introduced by https://github.com/vuejs/vitepress/commit/f86ac56b78da76f3061e6537b897bb13c1ed802d ?

I'll just use &lt; and &gt; instead of that escape

brc-dd commented 4 weeks ago

yeah

UnrefinedBrain commented 4 weeks ago

Ok that gets me to a new error, but not a vitepress one I don't think. Good find, thanks