jupyterhub / the-littlest-jupyterhub

Simple JupyterHub distribution for 1-100 users on a single server
https://tljh.jupyter.org
BSD 3-Clause "New" or "Revised" License
1.04k stars 340 forks source link

Some of the extension's files are not available in the notebook #585

Open drzamich opened 4 years ago

drzamich commented 4 years ago

Bug description

My custom Jupyter Notebook extension consist of the main.js file but also other files - JS helpers and React build artifacts. I install the package and enable the extension using the command

sudo -E jupyter nbextension install connector-jupyter --py --sys-prefix
sudo -E jupyter nbextension enable connector-jupyter --py --sys-prefix

All of the files are properly copied to the nbextensions directory:

admin@tec-l-011630:~$ ls /opt/tljh/user/share/jupyter/nbextensions/mstr_jupyter
MicroStrategy.yaml  cells-creation.js  iframe_style.css  main.js  
mstr-connector  mstr.ico  override_style.css  package-lock.json  python-code.js  utilities.js

When I run the extension in the Notebook however, only the main.js file is exposed on the server. Fetching others results in 404 error making the extension unusable.

Expected behaviour

All files are exposed on the server as it's in the case of the "desktop version" of Jupyter Notebook image

Actual behaviour

Only the main.js file is exposed on the server making the extension unusable. image

How to reproduce

  1. Install mstrio-py
    sudo -E pip install mstrio-py
  2. Enable the extension
    sudo -E jupyter nbextension install connector-jupyter --py --sys-prefix
    sudo -E jupyter nbextension enable connector-jupyter --py --sys-prefix
  3. Run the Notebook
  4. Open browser's Developer Tools
  5. Go to Sources tab
  6. In the left panel navigate to nbextensions/mstr_jupyter directory
  7. Observe that only main.js file is there.

Your personal set up

consideRatio commented 3 years ago

Thank you @drzamich for a beautifully written issue! I think this is a symptom of something that has been observed in other context as well, but I'm not sure what is going on.

Maybe related