Skip to content

build errors when file or folder named in Chinese and used in link #424

@fuchunhui

Description

@fuchunhui

Describe the bug

In docs folder, some files named in Chinese, that make errors, when yarn build .

API Extractor completed successfully
vitepress v0.20.0
⠙ building client + server bundles...
(!) Found dead link /guide/%E5%A4%8D%E5%88%B6 in file /Users/user/github/vitepress/docs/index.md
⠙ building client + server bundles...[vitepress] One or more pages contain dead links.
✖ building client + server bundles...
build error:
 Error: One or more pages contain dead links.
    at Object.renderStart (/Users/user/github/vitepress/dist/node/serve-6eb63a16.js:36672:15)
    at /Users/user/github/vitepress/node_modules/rollup/dist/shared/rollup.js:22620:25
    at async Promise.all (index 0)
    at async Bundle.generate (/Users/user/github/vitepress/node_modules/rollup/dist/shared/rollup.js:15901:13)
    at async handleGenerateWrite (/Users/user/github/vitepress/node_modules/rollup/dist/shared/rollup.js:23400:23) {
  code: 'PLUGIN_ERROR',
  plugin: 'vitepress',
  hook: 'renderStart'
}

Reproduction

yes, just change the file name or folder name to Chinese.

  1. copy a file, named to Chinese. cp docs/guide/api.md docs/guide/复制.md
  2. open docs/index.md, append a link.
## Chinese test
[测试中文](/guide/复制)'
  1. yarn docs-build.

Expected behavior

build completed successfully, no errors.

System Info

System:
  OS: macOS 10.15.3
  CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz
  Memory: 137.25 MB / 8.00 GB
  Shell: 5.7.1 - /bin/zsh
Binaries:
  Node: 16.8.0 - /usr/local/bin/node
  Yarn: 1.22.10 - /usr/local/bin/yarn
  npm: 7.21.0 - /usr/local/bin/npm
Browsers:
  Chrome: 95.0.4638.54
  Safari: 13.0.5

Additional context

[email protected]

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions