vuepress icon indicating copy to clipboard operation
vuepress copied to clipboard

Error not shown during development

Open PeppeL-G opened this issue 4 years ago • 3 comments

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 Text when published on a server and I try to access it as the first file the browser is loading.

Some questions about this:

  1. Why does it not complain about the error when building the app?
  2. 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.

PeppeL-G avatar Jan 25 '21 09:01 PeppeL-G

I have the same issue, but it happens because of using Vue component in the markdown file.

canicjusz avatar Feb 02 '21 13:02 canicjusz

Same here. Still exists in vuepress 1.9.7

judepereira avatar Apr 18 '22 10:04 judepereira

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.

soletan avatar Jul 31 '22 22:07 soletan