Dev install instructions don't build js
j-towns opened this issue · 3 comments
Running pip install -e .
doesn't appear to run npm to build the js into the /static folder. Running python setup.py build
before pip does build the js but maybe there is a better way of sorting this out.
It would also be great if it was possible to work on the js 'live' without having to rebuild, as you can with the Python. I'm inexperienced with js and don't know if npm has an option to do this...
Edit: I've noticed pip install -e .
works fine for this project https://github.com/ellisonbg/ipyleaflet, so maybe I'm doing something (or multiple things) wrong... I will try to work this out. j-towns/iprofiler#7
Hey @j-towns, I was having a similar problem. I was running on an Ubuntu Docker image and the key was to install nodejs-legacy
. (To my knowledge, it's just a symlink, but one that some applications will look for.) After that pip install -e .
did its magic.
@j-towns @WillEngler indeed the nodejs package on debian-based systems is not quite standard.
Regarding the possibility to edit the js live without having to rebuild manually, there are systems to watch the file system and build on change but I think that they tend to get in the way, but you can give it a try...
A benefit to the current system is that you can use other flavors of javascript (ES-6, typescript). The master branch of ipywidgets was recently migrated to typescript for example.
Closing as answered / stale.