vuepress
vuepress copied to clipboard
Error not shown during development
The following code in a markdown file:
<script>
window.sleep = function(sleepMs){
// ...
}
</script>
Gives me:
- No error during development when I first access another markdown file in the browser, and then click on a relative link that leads to this file.
- No error during development when I try to access it as the first file the browser is loading.
- No error when I publish on a server and then first access another markdown file in the browser, and then click on a relative link that leads to this file.
- The error
DOMException: Node.appendChild: Cannot add children to a Textwhen published on a server and I try to access it as the first file the browser is loading.
Some questions about this:
- Why does it not complain about the error when building the app?
- Can we make the build process complain about the error and abort?
Since this code works fine during development, I have had many bugs when published for quite some time I didn't know I had.
I have the same issue, but it happens because of using Vue component in the markdown file.
Same here. Still exists in vuepress 1.9.7
Came across the same issue. In my case, I figured out it's caused by having a level of elements in a component all excluded using v-if and/or v-else-if without any v-else or something that's available unconditionally.