Git Product home page Git Product logo

Comments (8)

andreas-h avatar andreas-h commented on September 9, 2024 3

Okay, I managed to make the installation work. I had to add

    "allowSyntheticDefaultImports": true

to tsconfig.json in the compilerOptions section.

from jupyterlab-slurm.

wl2776 avatar wl2776 commented on September 9, 2024 2

I've got corrupted jupyterlab after installation.

image

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.

from jupyterlab-slurm.

krinsman avatar krinsman commented on September 9, 2024

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.

from jupyterlab-slurm.

andreas-h avatar andreas-h commented on September 9, 2024

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/[email protected]" has unmet peer dependency "react@~16.8.4".
warning "@jupyterlab/application > @jupyterlab/ui-components > @blueprintjs/[email protected]" has unmet peer dependency "react-dom@^15.3.0 || 16".
warning "@jupyterlab/application > @jupyterlab/ui-components > @blueprintjs/core > [email protected]" has unmet peer dependency "react-dom@>=15.0.0".
warning "@jupyterlab/application > @jupyterlab/ui-components > @blueprintjs/[email protected]" 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.

from jupyterlab-slurm.

krinsman avatar krinsman commented on September 9, 2024

@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!

from jupyterlab-slurm.

krinsman avatar krinsman commented on September 9, 2024

@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)

conda list
# Name                    Version                   Build  Channel
appnope                   0.1.0                 py37_1000    conda-forge
attrs                     19.1.0                     py_0    conda-forge
backcall                  0.1.0                      py_0    conda-forge
bleach                    3.1.0                      py_0    conda-forge
bzip2                     1.0.8                h01d97ff_1    conda-forge
ca-certificates           2019.6.16            hecc5488_0    conda-forge
certifi                   2019.6.16                py37_1    conda-forge
decorator                 4.4.0                      py_0    conda-forge
defusedxml                0.5.0                      py_1    conda-forge
elasticsearch             7.0.2                    pypi_0    pypi
entrypoints               0.3                   py37_1000    conda-forge
invoke                    1.2.0                 py37_1000    conda-forge
ipykernel                 5.1.2            py37h5ca1d4c_0    conda-forge
ipython                   7.8.0            py37h5ca1d4c_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
jedi                      0.15.1                   py37_0    conda-forge
jinja2                    2.10.1                     py_0    conda-forge
json5                     0.8.5                      py_0    conda-forge
jsonschema                3.0.2                    py37_0    conda-forge
jupyter_client            5.3.1                      py_0    conda-forge
jupyter_core              4.4.0                      py_0    conda-forge
jupyterlab                1.1.3                      py_0    conda-forge
jupyterlab_server         1.0.6                      py_0    conda-forge
libcxx                    8.0.1                         0    conda-forge
libcxxabi                 8.0.1                         0    conda-forge
libffi                    3.2.1             h6de7cb9_1006    conda-forge
libsodium                 1.0.17               h01d97ff_0    conda-forge
markdown                  3.1.1                    pypi_0    pypi
markupsafe                1.1.1            py37h1de35cc_0    conda-forge
mistune                   0.8.4           py37h1de35cc_1000    conda-forge
nbconvert                 5.6.0                    py37_1    conda-forge
nbformat                  4.4.0                      py_1    conda-forge
nbresuse                  0.3.1                    pypi_0    pypi
ncurses                   6.1               h0a44026_1002    conda-forge
newrelic                  4.20.1.121               pypi_0    pypi
nodejs                    11.14.0              h6de7cb9_1    conda-forge
notebook                  6.0.1                    py37_0    conda-forge
openssl                   1.1.1c               h01d97ff_0    conda-forge
pandoc                    2.7.3                         0    conda-forge
pandocfilters             1.4.2                      py_1    conda-forge
parso                     0.5.1                      py_0    conda-forge
pexpect                   4.7.0                    py37_0    conda-forge
pickleshare               0.7.5                 py37_1000    conda-forge
pip                       19.2.3                   py37_0    conda-forge
prometheus_client         0.7.1                      py_0    conda-forge
prompt_toolkit            2.0.9                      py_0    conda-forge
psutil                    5.6.2            py37h01d97ff_0    conda-forge
ptyprocess                0.6.0                   py_1001    conda-forge
pycurl                    7.43.0.3                 pypi_0    pypi
pygments                  2.4.2                      py_0    conda-forge
pylibmc                   1.6.0                    pypi_0    pypi
pyrsistent                0.15.4           py37h01d97ff_0    conda-forge
python                    3.7.3                h93065d6_1    conda-forge
python-dateutil           2.8.0                      py_0    conda-forge
pyzmq                     18.0.2           py37hee98d25_2    conda-forge
readline                  8.0                  hcfe32e1_0    conda-forge
send2trash                1.5.0                      py_0    conda-forge
setuptools                41.2.0                   py37_0    conda-forge
six                       1.12.0                py37_1000    conda-forge
sqlite                    3.29.0               hb7d70f7_1    conda-forge
statsd                    3.3.0                    pypi_0    pypi
terminado                 0.8.2                    py37_0    conda-forge
testpath                  0.4.2                   py_1001    conda-forge
tk                        8.6.9             h2573ce8_1002    conda-forge
tornado                   5.1.1                    pypi_0    pypi
traitlets                 4.3.2                 py37_1000    conda-forge
urllib3                   1.25.3                   pypi_0    pypi
wcwidth                   0.1.7                      py_1    conda-forge
webencodings              0.5.1                      py_1    conda-forge
wheel                     0.33.6                   py37_0    conda-forge
xz                        5.2.4             h1de35cc_1001    conda-forge
zeromq                    4.3.2                h6de7cb9_2    conda-forge
zlib                      1.2.11            h01d97ff_1006    conda-forge 

@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.

from jupyterlab-slurm.

krinsman avatar krinsman commented on September 9, 2024

@wl2776 I made this a separate issue, see: #32

from jupyterlab-slurm.

krinsman avatar krinsman commented on September 9, 2024

@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.

from jupyterlab-slurm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.