vuepress: Failed to execute 'appendChild' on 'Node': This node type does not support this method.
- I confirm that this is an issue rather than a question.
Bug report
Steps to reproduce
What is expected?
What is actually happening?
Other relevant information
- Output of
npx vuepress infoin my VuePress project:
When I develop my docs in development environment, it is ok.
When i build it and put it on my server with nginx, it is also ok.
However when i refresh the page with routes like this http://xxx.com/develop
It has the error below

About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 13
- Comments: 32 (2 by maintainers)
Commits related to this issue
- :bug: Fix DOM updates from v-if Using vuetify breakpoints in v-if makes the component dynamic, which causes a DOM exception. See: https://github.com/vuejs/vuepress/issues/1692. — committed to gundamMC/blog by gundamMC 4 years ago
- fix: Vue hydration fails Failed to execute 'appendChild' on 'Node' https://github.com/vuejs/vuepress/issues/1692 — committed to Swedish-li/Swedish-li.github.io by Swedish-li 4 years ago
- Fixed bug - https://github.com/vuejs/vuepress/issues/1692 — committed to eliot-ye/vuepress-theme-blog-official-style by eliot-ye a year ago
Just a hint: Another common mistake is to use dynamic vue components that should render client side but forget to ignore them in static builds… 99% of those issues in our projects were missing
<ClientOnly>. So try:and read https://vuepress.vuejs.org/guide/using-vue.html
still having the problem
but it only happened when it deploy to production enviorement I didnt get any error when running in local enviorement
I have no enhanceApp.js file and no nginx, but still have this issue.
I solved this question by change nginx config from
try_files $uri /index.htmltotry_files $uri $uri/ /index.html. Final results like:nginx
try_files $uri $uri/ /index.html;
I also have same issue in my case it on v-html example :
so I just wrap it it resolve<pv-html=“item.description”><client-only><pv-html="item.description"></p></client-only>Leaving a comment here in case someone else made the same mistake as me. Using an XML comment like:
<!-- Comment -->inside a markdown table in a .md file used by Vuepress causes this error as wellThx for your repo @hugojing ,
In your case, simply change all of the
[<h2>***</h2>](***)into## [***](***)will solve the problem.I don’t know if others are suffering from this problem because of the similar reason, but I suggest you all double check your HTML syntax in your corresponding page.
If anyone still can’t fix this problem, pls provide a minimal reproduction or describe how to reproduce the problem.