device
device copied to clipboard
Error while initializing app DOMException: Failed to execute 'appendChild' on 'Node': This node type does not support this method.
I keep getting this issue when showing/hiding elements using v-if="", works during dev but not after generate.
Error while initializing app DOMException: Failed to execute 'appendChild' on 'Node': This node type does not support this method.
Any idea why?
Could you make a repository that reproduce this problem?
This exact thing happened to me. For me it was that I had
<div v-if="$device.isMobile" class="header-padding"/>
when I changed it to
<div v-if="$device.isMobile" class="header-padding><!-- --></div>
the error disappeared but I'm having another problem where it behaves differently in production vs in development :(
I have the same problem. Any update?
Please create a reproduction in order fo us to help you. Using v-if on a root node can lead to this error, this is a known bug in Vue 2 actually.
@Horsetoast Thank you. I suffered the same problem, and the solution was to not auto-close native tags.
So <div v-if="$device.isMobile" props="here" /> doesn't compile well, whereas <div v-if="$device.isMobile" props="here" ></div> did.
Makes total sense, IMO, as native tags should be closed according to standards.