device icon indicating copy to clipboard operation
device copied to clipboard

Error while initializing app DOMException: Failed to execute 'appendChild' on 'Node': This node type does not support this method.

Open jesperlandberg opened this issue 7 years ago • 5 comments

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?

jesperlandberg avatar Jul 28 '18 05:07 jesperlandberg

Could you make a repository that reproduce this problem?

dotneet avatar Jul 29 '18 04:07 dotneet

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 :(

Horsetoast avatar Aug 10 '18 21:08 Horsetoast

I have the same problem. Any update?

AliRezaBeitari avatar Jan 23 '21 17:01 AliRezaBeitari

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.

atinux avatar Jan 27 '21 11:01 atinux

@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.

urbgimtam avatar Mar 26 '21 18:03 urbgimtam