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

[Bug report] Markdown lists cause navigation error while using a custom theme. #688

Closed
yuchanns opened this issue Feb 13, 2022 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@yuchanns
Copy link

yuchanns commented Feb 13, 2022

Bug report

Description

I have made a very simple custom theme demo according to the guide of document, which has two navbar on its Layout.vue component.

On the begining, everything goes well, I can navigate from home page to about page just by clicking the link. You can experience this by the online demo I deployed on vercel.

Thing came to happen when I added a list on README.md. I clicked the link on navbar and the conent of page disappeared, and a TypeError threw out on the console shows TypeError: Cannot read properties of null (reading 'insertBefore'). You can see it on this version I deployed.

Is it a bug? Or one my misbehavior?

This only happens on build mode.

update: I found this happens with markdown table too. And when I first visit the about page, it will navigate correctly to home page and then I can navigate back to about page without problem.

Steps to reproduce

  1. Clone the reprodution repo, build it and deploy as a site.
  2. Click the about link on navbar.

Expected behavior

Navigate correctly to see about page.

Screenshots

image

Environment info

  • Browser: Chrome 98.0.4758.80 arm64
  • Output of vuepress info:
 System:
    OS: Linux 5.10 Ubuntu 20.04.3 LTS (Focal Fossa)
    CPU: (8) arm64 unknown
    Memory: 26.83 GB / 31.30 GB
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node
    Yarn: 1.22.15 - ~/.nvm/versions/node/v16.13.2/bin/yarn
    npm: 8.1.2 - ~/.nvm/versions/node/v16.13.2/bin/npm
  Utilities:
    Git: 2.25.1 - /usr/bin/git
  Browsers:
    Chrome: Not Found
    Firefox: Not Found
  npmPackages:
    @vuepress/bundler-vite:  2.0.0-beta.35
    @vuepress/bundler-webpack: Not Found
    @vuepress/cli:  2.0.0-beta.35
    @vuepress/client:  2.0.0-beta.35
    @vuepress/core:  2.0.0-beta.35
    @vuepress/markdown:  2.0.0-beta.35
    @vuepress/plugin-active-header-links:  2.0.0-beta.35
    @vuepress/plugin-back-to-top:  2.0.0-beta.35
    @vuepress/plugin-container:  2.0.0-beta.35
    @vuepress/plugin-docsearch: Not Found
    @vuepress/plugin-external-link-icon:  2.0.0-beta.35
    @vuepress/plugin-git:  2.0.0-beta.35
    @vuepress/plugin-google-analytics: Not Found
    @vuepress/plugin-medium-zoom:  2.0.0-beta.35
    @vuepress/plugin-nprogress:  2.0.0-beta.35
    @vuepress/plugin-palette:  2.0.0-beta.35
    @vuepress/plugin-prismjs:  2.0.0-beta.35
    @vuepress/plugin-pwa: Not Found
    @vuepress/plugin-pwa-popup: Not Found
    @vuepress/plugin-register-components: Not Found
    @vuepress/plugin-search: Not Found
    @vuepress/plugin-shiki: Not Found
    @vuepress/plugin-theme-data:  2.0.0-beta.35
    @vuepress/plugin-toc: Not Found
    @vuepress/shared:  2.0.0-beta.35
    @vuepress/theme-default:  2.0.0-beta.35
    @vuepress/utils:  2.0.0-beta.35
    vue:  3.2.31
    vue-loader: Not Found
    vue-router:  4.0.12
    vuepress: ^2.0.0-beta.35 => 2.0.0-beta.35
    vuepress-vite:  2.0.0-beta.35
    vuepress-webpack: Not Found
@github-actions github-actions bot added the stale label Feb 21, 2022
@github-actions
Copy link

This issue is marked as stale because it has not had recent activity. Issues marked with stale will be closed if they have no activity within 3 days.

@Mister-Hope Mister-Hope reopened this Feb 24, 2022
@Mister-Hope Mister-Hope added bug Something isn't working and removed stale labels Feb 24, 2022
@Mister-Hope
Copy link
Member

The issue is an internal error trigger by vue, and I am not sure how it happens. So I will leave this to you.

@meteorlxy
Copy link
Member

#897 (comment)

@jlooper
Copy link

jlooper commented May 25, 2022

I'm seeing this as well

@meteorlxy
Copy link
Member

I hope this has been fixed in 2.0.0-beta.46. Let me know if you still meet similar issues.

@NicolasThierion
Copy link

Upgraded from beta.45 to beta.46, and I confirm the issue is still present.
Using a custom theme as well (customized theme-hope), and a custom sidebar config.

If I disable the sidebar, the problem goes away

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants