ipyleaflet
ipyleaflet copied to clipboard
Changes to javascript are not getting reflected
I'm running Ubuntu 20.04.
I'm trying to develop an extension for Ipyleaflet, and have followed the development advice like so:
git clone https://github.com/jupyter-widgets/ipyleaflet.git
cd ipyleaflet
pip install -e .
jupyter labextension develop --overwrite ipyleaflet
I'm running all of this within a conda environment created from environment.yml
Ipyleaflet then works fine on Jupyter Lab, great. I have then tried to first and foremost modify an existing javascript file (in this case the MagnifyingGlass.js -file), while using
jlpm run watch
And
jupyter lab --watch
The changes aren't reflected when reloading the jupyter lab -page in the browser. I have similarly tried creating an entirely new Javascript-file with the required view and model (MyClassModel and MyClassView), exported that file within jupyter-leaflet.js, and created the necessary new Python class (MyClass) in /ipyleaflet/leaflet.py. Importing the python class in a Jupyter Lab window works fine, but when trying to create an instance of the class the browser throws the error
Uncaught (in promise) Error: Class MyClassModel not found in module jupyter-leaflet.
I've tried doing everything three times over, rebuilding manually, and so on, but nothing seems to work. It seems that whatever javascript-changes are made, the python side never becomes aware of it. I have similarly tried this in a normal notebook environment (fulfilling the guidance in the official documentation for developing in jupyter notebook), but get the exact same result there.
Thank you for any help you may offer!