Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jesperlandberg opened this issue Jul 28, 2018 · 5 comments

Comments

@jesperlandberg
Copy link

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?

@dotneet
Copy link
Collaborator

dotneet commented Jul 29, 2018

Could you make a repository that reproduce this problem?

@Horsetoast
Copy link

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

@AliRezaBeitari
Copy link

I have the same problem. Any update?

@atinux
Copy link
Contributor

atinux commented Jan 27, 2021

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.

@urbgimtam
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants