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
Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'. #146
Comments
Hi @Fillah, You name your component v-XXXX so in your template make sure to use the same name. <v-map :zoom="zoom" :center="center">
<v-tilelayer :url="url" :attribution="attribution"></v-tilelayer>
<v-marker v-for="marker in markers" :key="marker.id" :visible="marker.visible" :draggable="marker.draggable" :lat-lng="marker.position">
<v-popup :content="marker.tooltip" />
<v-tooltip :content="marker.tooltip" />
</v-marker>
</v-map> Hope this helps, Micka |
Sorry i was too fast writing the code, @KoRiGaN . I actually do have that code you wrote and i still get the error |
@KoRiGaN, could this be related to an "older" version of Vue, leaflet or Proj4? Vue: 2.4.4 EDIT: I have another project where it all works. Not sure why in this specific case it doesn't. I'm using it in a Vue-pwa template with service worker. The difference between this project and the other where it works is that this was created before the other. The fix might be to create a new project with the same setup. |
I tried with different version of Vue and it worked fine. Do you have a project available where I can test that issue and fix it? If I'm not able to reproduce the error I'm afraid I will have to close that issue. Mickaël |
the project is for a customer and i therefore i can't share the project with you, sadly. Otherwise i'm just gonna close it and try something else. But thank you for your time and help :) |
It doesn't seem to be Vue2Leaflet related as 'Node' and 'appendChild' doesn't exist in the Vue2Leaflet codebase. Could you try: Hope this helps, Micka |
Only popup: The error only occurs when i click on a marker and no popup shows. |
All these errors are triggered in leaflet so I don't know what is going on. I would help to narrow down possible issues and find a fix. |
The following link may help narrow down this issue. |
This is still happening to me. It started happening out of nowhere. |
Same issue for me, using ^1.1.1
@KoRiGaN By default it seems that Leaflet 1.3 is installed, I've manually added the package and set it to ^1.2 and this made the tooltop work! So there is a BC breaking change in the 1.3 release that makes it dysfunctional with vue2-leaflet. :( |
i meet this problem yestoday when i updated vue2-leaflet from 1.0.2 to 1.1.1, while leaflet is the newest version 1.3.4. However, before update vue2-leaflet to 1.1.1, it all work fine. So, i wonder where the error come from, from vue2-leaflet or leaflet? @KoRiGaN Could you please take some attention to find it out and solve? Thank you! |
@chaogis Can you please share the code snippet that cause the error ? |
|
|
@chaogis Thank you for the code, I will try to replicate the problem! |
I have this issue also, but I cannot reproduce it in jsfiddle.. |
@HIMISOCOOL @chaogis Hello, I've got the same issue. I just removed leaflet dependency, and run |
Ok, thank you very much, if i find other problems, i will write to you.
chao_gis@163.com
From: Nicolò Maria Mezzopera
Date: 2018-11-20 14:35
To: KoRiGaN/Vue2Leaflet
CC: chaogis; Mention
Subject: Re: [KoRiGaN/Vue2Leaflet] Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'. (#146)
Reopened #146.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I also got this error when building with webpack using Node 11.x. Reverting back to Node 10 resolved the issue. Just wanted to make a note here in case it is helpful for future development or if anyone else comes across this error and they happen to be on Node 11 (current stable at the time of writing). |
@mikebronner will try to test with node 11 |
@mikebronner I quickly tested with the examples and it works fine! can you post your package.json ? |
I found same problem. and it solved. show that example, on component,
and on main.js
After remove section of leaflet is related from main,js, runs successfully. |
hey! |
@yokane, I'm not sure if the cause for the problems we are having is the same. I am registering the components globally with Vue: import Vue2Leaflet from "vue2-leaflet";
import Vue2LeafletMarkerCluster from 'vue2-leaflet-markercluster';
Vue.component("l-attribution", Vue2Leaflet.LControlAttribution);
Vue.component("l-map", Vue2Leaflet.LMap);
Vue.component("l-marker", Vue2Leaflet.LMarker);
Vue.component("l-popup", Vue2Leaflet.LPopup);
Vue.component("l-tile-layer", Vue2Leaflet.LTileLayer);
Vue.component("l-wms-tile-layer", Vue2Leaflet.LWMSTileLayer);
Vue.component("l-zoom", Vue2Leaflet.LControlZoom);
Vue.component("v-marker-cluster", Vue2LeafletMarkerCluster); Unless |
Hi, My nuxt.config file : My plugins/leaflet.js file :
And my component `
When I hover the marker
|
To everyone please check the workaround with the alias in the meantime I finish the 2.0 |
In case it helps anyone else I started getting this issue and in my case it turned out to be because the text source I was using in the popup/tooltip was actually numerical and I had to explicitly convert it to a string to avoid the error. |
2.0 is released since a while, closing this, feel free to re-open |
Hey KoRiGaN.
I just installed Vue2-leaflet 0.0.60 to my project and followed your simple example on how to set it up, which works. The problem appears when i'm trying to add a popup or tooltip to my markers. The error happens on load and whenever i hover over a marker / clicks on a marker.
Error:
I have the following code:
Got any suggestion how to fix this?
The text was updated successfully, but these errors were encountered: