Closed andreas-h closed 4 years ago
Are you installing this from source or from the PyPI+NPM repositories? The published packages are outdated, so for now if you want to use this with JupyterLab 1.0+, you will need to install it from source. (See e.g. the discussion here.)
Run in the terminal:
git clone https://github.com/NERSC/jupyterlab-slurm.git
cd jupyterlab-slurm
pip install .
jupyter serverextension enable --sys-prefix jupyterlab_slurm
jlpm install
jlpm run build
jupyter labextension install
@andreas-h Let me know if that helped so we can know whether to close this issue or not.
Thanks, @krinsman. The pip part seems to work fine, but in jlpm I'm getting warnings and an error:
$ jlpm install
yarn install v1.15.2
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@jupyterlab/application > @jupyterlab/ui-components@1.1.0" has unmet peer dependency "react@~16.8.4".
warning "@jupyterlab/application > @jupyterlab/ui-components > @blueprintjs/core@3.18.0" has unmet peer dependency "react-dom@^15.3.0 || 16".
warning "@jupyterlab/application > @jupyterlab/ui-components > @blueprintjs/core > react-transition-group@2.9.0" has unmet peer dependency "react-dom@>=15.0.0".
warning "@jupyterlab/application > @jupyterlab/ui-components > @blueprintjs/select@3.10.0" has unmet peer dependency "react-dom@^15.3.0 || 16".
[4/4] Building fresh packages...
success Saved lockfile.
warning Your current version of Yarn is out of date. The latest version is "1.17.3", while you're on "1.15.2".
Done in 32.05s.
$ jlpm run build
yarn run v1.15.2
$ tsc
node_modules/@jupyterlab/ui-components/lib/icon/iconregistry.d.ts:1:8 - error TS1192: Module '"/home/jupyter/src/jupyterlab-slurm/node_modules/@types/react/index"' has no default export
.
1 import React from 'react';
~~~~~
node_modules/@jupyterlab/ui-components/lib/icon/interfaces.d.ts:3:8 - error TS1192: Module '"/home/jupyter/src/jupyterlab-slurm/node_modules/@types/react/index"' has no default export.
3 import React from 'react';
~~~~~
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I'm in a conda environment.
Okay, I managed to make the installation work. I had to add
"allowSyntheticDefaultImports": true
to tsconfig.json
in the compilerOptions
section.
I've got corrupted jupyterlab after installation.
Restarting server and kernels did not help.
I've resolved this issue with reinstallation of jupyterlab (conda install --force-reinstall jupyterlab
). However, jupyterlab-slurm extension has disappeared after this.
@andreas-h That seems like a good fix for the problem. Based on the error I'm not sure whether that is a problem on our side, JupyterLab's side, or React's side. @tslaton Do you know how to diagnose this? Should we use a more specific import statement from the JupyterLab modules?
Anyway I will upload that bug fix now.
I think using npm sometimes leads to things working out better than using Yarn (which is what jlpm) but I don't really know and am actually somewhat grasping at straws here.
EDIT: OK allowSyntheticDefaultImports
is now true in the master branch of JupyterLab Slurm.
Thank you @andreas-h for catching this and letting us know what the fix is!
@wl2776 This is obviously not good. Are you using the newest version of JupyterLab (or at least the JupyterLab package from Conda Forge)?
I am not sure right now what the fix is but it is obviously a breaking issue, thank you for bring it to our attention @wl2776!
Maybe can you post the output of conda list
so we can compare environments? What operating system are you running on? (See here for formatting collapsible things)
@tslaton This looks exactly like the error we say with JupyterLab-cpustatus, right? Are we sure this is a bug we can fix on our side, or do you think we should open an issue with JupyterLab?
It seems suspicious that the same error would happen independently in two different extensions written in two very different ways if there was no problem with breaking changes to JupyterLab extension API.
I'm not able to reproduce the error on this machine with JupyterLab Slurm, but I got the same error with JupyterLab-cpustatus on Friday on a different machine. I'm not sure what to do about this.
@wl2776 I made this a separate issue, see: https://github.com/NERSC/jupyterlab-slurm/issues/32
@andreas-h I'll close this for now, since you said the fix you proposed worked for you, it seemed to work for me too, and the fix has now been pushed to master. Please request that it be reopened if it hasn't actually been fixed yet.
When I try to install (JupyterLab 1.1.1, JupyterHub 1.0), I get the following:
The log file looks like this:
I'd greatly appreciate any help in sorting this out.