jupyter-widgets-contrib / ipygany

3-D Scientific Visualization in the Jupyter Notebook
BSD 3-Clause "New" or "Revised" License
489 stars 52 forks source link

Jupyter labextension (re)install fails (minimize error) #72

Open benbovy opened 4 years ago

benbovy commented 4 years ago

... unless I re-build jupyterlab with --minimize=False.

JupyterLab v2.2.8
Known labextensions:
   app dir: /Users/bbovy/miniconda3/envs/jupyterlab/share/jupyter/lab
        @jupyter-voila/jupyterlab-preview v1.1.0  enabled  OK
        @jupyter-widgets/jupyterlab-manager v2.0.0  enabled  OK
        @jupyter-widgets/jupyterlab-sidecar v0.5.0  enabled  OK
        @jupyterlab/debugger v0.3.2  enabled  OK
        @jupyterlab/geojson-extension v2.0.1  enabled  OK
        @jupyterlab/git v0.21.1  enabled  OK
        @jupyterlab/toc v4.0.0  enabled  OK
        @pyviz/jupyterlab_pyviz v1.0.4  enabled  OK
        dask-labextension v3.0.0  enabled  OK
        ipycanvas v0.5.1  enabled  OK
        ipygany v0.4.0  enabled  OK
        jupyter-cytoscape v1.0.4  enabled  OK
        jupyter-leaflet v0.13.2  enabled  OK
        jupyterlab-datawidgets v6.3.0  enabled  OK
        jupyterlab-drawio v0.7.0  enabled  OK
        nbdime-jupyterlab v2.0.0  enabled  OK

xref https://github.com/jupyterlab/jupyterlab/issues/8688

Perhaps it won't be relevant anymore after #70 so feel free to close this @martinRenou.

martinRenou commented 4 years ago

Is it in Binder?

martinRenou commented 4 years ago

There have been multiple reports lately that building JupyterLab fails on Binder, and it's very likely due to memory issues. Disabling minimize seems to use less memory indeed.

And this should be fixed with JupyterLab 3 but we need to update ipygany accordingly. I am actually working on this today.

benbovy commented 4 years ago

Both in Binder and locally.

I can see for the local build that the error message is coming from Terser:

ERROR in vendors~main.3d694714f4f0957e53a0.js from Terser
    Unexpected token: punc ()) [./node_modules/three/examples/jsm/nodes/materials/nodes/StandardNode.js:332,0][vendors~main.3d694714f4f0957e53a0.js:249387,2]
        at ee (/Users/bbovy/miniconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/terser/dist/bundle.min.js:1:19541)
        at c (/Users/bbovy/miniconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/terser/dist/bundle.min.js:1:28244)
        at l (/Users/bbovy/miniconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/terser/dist/bundle.min.js:1:28335)
        at f (/Users/bbovy/miniconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/terser/dist/bundle.min.js:1:28388)
        at Ee (/Users/bbovy/miniconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/terser/dist/bundle.min.js:1:47819)
        at _e (/Users/bbovy/miniconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/terser/dist/bundle.min.js:1:47505)
        at _e (/Users/bbovy/miniconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/terser/dist/bundle.min.js:1:47237)
        at G (/Users/bbovy/miniconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/terser/dist/bundle.min.js:1:42552)
        at ge (/Users/bbovy/miniconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/terser/dist/bundle.min.js:1:48272)
        at /Users/bbovy/miniconda3/envs/jupyterlab/share/jupyter/lab/staging/node_modules/terser/dist/bundle.min.js:1:49152
martinRenou commented 4 years ago

Not sure I can help on this :S I wouldn't know where to start looking.

Sometimes conda ships a very outdated version of nodejs, maybe check that your version is the latest?

benbovy commented 4 years ago

I updated to the latest nodejs version 14.13.1, the error is still there...

Not sure I can help on this :S I wouldn't know where to start looking.

No worries, I'm fine using minimize=False for now and I'm looking forward Jupyterlab 3.

bilke commented 4 years ago

These are the commands which worked for me:

jupyter labextension install @jupyter-widgets/jupyterlab-manager ipygany --no-build
jupyter lab build --minimize=False