I've installed ipyleaflet in jupyter lab using based on the following guide: https://ipyleaflet.readthedocs.io/en/latest/installation/index.html#jupyterlab-extension
The following code executes, the map is shown correctly but the layers (in this case one Marker) are not showing up.
from ipyleaflet import Map, Marker
center = [21.501558, 39.184964]
m = Map(center=center, zoom=15)
marker = Marker(location=center, draggable=True)
m.add_layer(marker)
display(m)
The browser console shows the following warnings:
Failed to fetch ipywidgets through the "jupyter.widget.control" comm channel, fallback to fetching individual model state. Reason: Control comm was closed too early
_loadFromKernel
Could not create a view for model id ...
Followed by an error:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '_layerAdd')
at e.addLayer (leaflet-src.js:6889:16)
at 138.69ef2a39232f5de9d78a.js?v=69ef2a39232f5de9d78a:1:39625
at async Promise.all (index 1)
What could be the reason for layers not showing up on the correctly rendered map?