Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vitepress serve tries to load an md.undefined.js file #1578

Closed
3 tasks done
you-hengh opened this issue Nov 4, 2022 · 3 comments
Closed
3 tasks done

vitepress serve tries to load an md.undefined.js file #1578

you-hengh opened this issue Nov 4, 2022 · 3 comments
Labels
bug: pending triage Maybe a bug, waiting for confirmation

Comments

@you-hengh
Copy link
Contributor

Describe the bug

pagePath = pagePath.slice(base.length).replace(/\//g, '_') + '.md'

by

pagePath =
(pagePath.slice(base.length).replace(/\//g, '_') || 'index') + '.md'

should fix this.

Originally posted by @brc-dd in #412 (comment)

I still have this problem

vitepress version:1.0.0-alpha.26 or npm:@brc-dd/[email protected]

I try to configure cleanUrls: 'with-subfolders' or cleanUrls:' without-subfolders' or delete the cleanUrls configuration item makes no difference or is still reporting an error

I will temporarily open my repo to find bugs.

Reproduction

package.json

{
  "name": "vitepress",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "dev": "vitepress dev docs",
    "build": "vitepress build docs",
    "serve": "vitepress serve docs"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@algolia/client-search": "^4.14.2",
    "vitepress": "npm:@brc-dd/[email protected]"
  }
}
  1. pnpm build

    > vitepress build docs
    
    vitepress v1.0.0-dev.50d1202
    ✓ building client + server bundles...
    ⠋ rendering pages...[Vue warn]: Component <Anonymous> is missing template or render    function.
    [Vue warn]: Component <Anonymous> is missing template or render function.
    [Vue warn]: Component <Anonymous> is missing template or render function.
    [Vue warn]: Component <Anonymous> is missing template or render function.
    [Vue warn]: Component <Anonymous> is missing template or render function.
    [Vue warn]: Component <Anonymous> is missing template or render function.
    [Vue warn]: Component <Anonymous> is missing template or render function.
    [Vue warn]: Component <Anonymous> is missing template or render function.
    ✓ rendering pages...
    build complete in 3.35s.
  2. pnpm serve

    > [email protected] serve /Users/bddxg/Documents/网站/vitepress 站点
    > vitepress serve docs
    
    vitepress v1.0.0-dev.50d1202
    Built site served at http://localhost:4173/

Expected behavior

fix bug or tell me the solution.

System Info

System:
    OS: macOS 13.0
    CPU: (10) arm64 Apple M1 Max
    Memory: 5.11 GB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.17.1 - ~/Library/pnpm/node
    npm: 8.15.0 - ~/Library/pnpm/npm
  Browsers:
    Chrome: 106.0.5249.119
    Safari: 16.1
  npmPackages:
    @brc-dd/vitepress:  1.0.0-dev.50d1202

Additional context

No response

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.
@you-hengh you-hengh added the bug: pending triage Maybe a bug, waiting for confirmation label Nov 4, 2022
@you-hengh
Copy link
Contributor Author

I updated my repo, the main change is that some of my previous nav and sidebar are empty links, and now they all have content, and my error report has been reduced to one.
image
I'm surprised about this error, I've never written anything about guide_what-is-vitepress.md,I don't even know how to fix this error

@brc-dd
Copy link
Member

brc-dd commented Nov 6, 2022

I've never written anything about guide_what-is-vitepress.md

Sure you've: https://github.com/you-hengh/myblog_vitepress/blob/main/docs/index.md?plain=1#L14

@brc-dd brc-dd closed this as not planned Won't fix, can't repro, duplicate, stale Nov 6, 2022
@you-hengh
Copy link
Contributor Author

I've never written anything about guide_what-is-vitepress.md

Sure you've: https://github.com/you-hengh/myblog_vitepress/blob/main/docs/index.md?plain=1#L14

Oh, my God, thank you very much, this part of the content I directly copy official website, I did not notice that it added a link,Anyway, thank you very much for your reply.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug: pending triage Maybe a bug, waiting for confirmation
Projects
None yet
Development

No branches or pull requests

2 participants