widgetti / ipyvolume

3d plotting for Python in the Jupyter notebook based on IPython widgets using WebGL
MIT License
1.95k stars 236 forks source link

jupyter lab extension fails #293

Open mlamarre opened 4 years ago

mlamarre commented 4 years ago

The following command

jupyter labextension install ipyvolume

fails.

In the log. the error seems to be related to JS heap out memory.

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

I have this while building a docker image in a CI scripts that runs everyday, the error first showed up on Feb, 29th 2020.

Dockerfile is a Ubuntu 18.04 image with miniconda installed and configured, followed by these commands:

RUN conda install -y -c conda-forge matplotlib jupyter jupyterlab requests ipympl ipywidgets ipyvolume tqdm nodejs
RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager
RUN jupyter labextension install jupyter-threejs
RUN jupyter labextension install ipyvolume

I don't know anything about npm, but other project suggest increasing the memory limit using npm scripts in package.json. (last post of https://github.com/angular/angular-cli/issues/5618)

maartenbreddels commented 4 years ago

Hi Matthieu,

can you try export NODE_OPTIONS=--max-old-space-size=4096?

cheers,

Maarten

mlamarre commented 4 years ago

That works! Thanks!

Dockerfile fix:

ENV NODE_OPTIONS=--max-old-space-size=4096
RUN jupyter labextension install ipyvolume
consideRatio commented 4 years ago

:tada: This issue can now be closed!