NERSC / jupyterlab-slurm

BSD 3-Clause "New" or "Revised" License
92 stars 23 forks source link

ValueError: "jupyterlab-slurm" is not a valid extension: #36

Closed joschaschmiedt closed 4 years ago

joschaschmiedt commented 4 years ago

When I try to install the jupyterlab extension it fails with the following message:

(jupyterhub) root@XXX:~# jupyter labextension install jupyterlab-slurm
An error occured.
ValueError: "jupyterlab-slurm" is not a valid extension:
Missing extension module "lib/index.js"
See the log file for details:  /tmp/jupyterlab-debug-2pxuxcq0.log

The log file contains the following:

Node v10.13.0

> /opt/ESIsoftware/python/envs/jupyterhub/bin/npm pack jupyterlab-slurm
npm notice 
npm notice 📦  jupyterlab-slurm@1.0.0
npm notice === Tarball Contents === 
npm notice 1.5kB  LICENSE                   
npm notice 7.6kB  style/index.css           
npm notice 1.9kB  package.json              
npm notice 1.7kB  README.md                 
npm notice 1.1kB  style/nersc_icon_small.png
npm notice 39.4kB style/nersc_icon.png      
npm notice === Tarball Details === 
npm notice name:          jupyterlab-slurm                        
npm notice version:       1.0.0                                   
npm notice filename:      jupyterlab-slurm-1.0.0.tgz              
npm notice package size:  45.9 kB                                 
npm notice unpacked size: 53.3 kB                                 
npm notice shasum:        9e052a27177d70d2a5c6aefd264b0e4dfdd74dca
npm notice integrity:     sha512-x94oXx0lnG/1m[...]zBFYdxVm9JzGw==
npm notice total files:   6                                       
npm notice 
jupyterlab-slurm-1.0.0.tgz

Traceback (most recent call last):

  File "/opt/ESIsoftware/python/envs/jupyterhub/lib/python3.7/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
    yield

  File "/opt/ESIsoftware/python/envs/jupyterhub/lib/python3.7/site-packages/jupyterlab/labextensions.py", line 93, in start
    ans = self.run_task()

  File "/opt/ESIsoftware/python/envs/jupyterhub/lib/python3.7/site-packages/jupyterlab/labextensions.py", line 147, in run_task
    for i, arg in enumerate(self.extra_args)

  File "/opt/ESIsoftware/python/envs/jupyterhub/lib/python3.7/site-packages/jupyterlab/labextensions.py", line 147, in <listcomp>
    for i, arg in enumerate(self.extra_args)

  File "/opt/ESIsoftware/python/envs/jupyterhub/lib/python3.7/site-packages/jupyterlab/commands.py", line 321, in install_extension
    return handler.install_extension(extension, pin=pin)

  File "/opt/ESIsoftware/python/envs/jupyterhub/lib/python3.7/site-packages/jupyterlab/commands.py", line 525, in install_extension
    info = self._install_extension(extension, tempdir, pin=pin)

  File "/opt/ESIsoftware/python/envs/jupyterhub/lib/python3.7/site-packages/jupyterlab/commands.py", line 1415, in _install_extension
    raise ValueError(msg % (extension, '\n'.join(messages)))

ValueError: "jupyterlab-slurm" is not a valid extension:
Missing extension module "lib/index.js"

Exiting application: jupyter

Did I do something wrong? The environment has

jupyter              1.0.0     
jupyter-client       5.3.3     
jupyter-console      6.0.0     
jupyter-core         4.5.0     
jupyter-server-proxy 1.1.0     
jupyterhub           0.9.6     
jupyterlab           1.1.4     
jupyterlab-server    1.0.6     
jupyterlab-slurm     1.0.5   
krinsman commented 4 years ago

@joschaschmiedt Thank you for the feedback!

To clarify, how were you installing (or attempting to install) the extension?

Via jupyter labextension install jupyterlab-slurm? Or via source (cloned the git repo)?

In the former case it could be a problem with the package I uploaded to NPM. In the second case the problem is something else.

My guess, if you were installing from NPM, is that I didn't build the package to transpile Typescript to Javascript before pushing to NPM. (Based on the error complaining about there being no index.js.) Which I think would explain why it doesn't work. I need to test this locally first to make sure that's the case or not.

krinsman commented 4 years ago

Update: To confirm, attempting to install myself using jupyter labextension install jupyterlab-slurm leads to the exact same error that you reported.

Thank you again for notifying us of this error! It seems like something which affects all users. It may have already impacted several other people, but you were the first person who let us know something was wrong. I really appreciate it! Currently seeing if I can implement a fix.

krinsman commented 4 years ago

Update 2: I just upgraded the NPM package to version 1.0.1 from 1.0.0 -- this one seems to work.

@joschaschmiedt Would you mind checking to see whether it installs for you now?

Thank you again so much for bringing this to our attention! This was a really big mistake on my part.

joschaschmiedt commented 4 years ago

@krinsman Thanks, version 1.0.1 fixes the issue for me. Thanks for a great tool!