QuantStack/jupyterlab-drawio

Installation Issue

levyblue opened this issue · 2 comments

Hello Community,

I am having issues to install the extension.

Hope someone can point be in the right direciton.

Open Anaconda Prompt as admin and run:

jupyter labextension install jupyterlab-drawio

Get the following Message:

Building jupyterlab assets (build:prod:minimize)
An error occured.
RuntimeError: JupyterLab failed to build
See the log file for details:  C:\Users\xxx\AppData\Local\Temp\jupyterlab-debug-mfyjled7.log

Log File Says:

Yarn configuration loaded.
Node v10.13.0

> C:\Users\xxx\AppData\Local\Continuum\anaconda3\npm.CMD pack jupyterlab-drawio
npm notice 
npm notice package: jupyterlab-drawio@0.6.0
... tons of npm notices ...
npm notice total files:   1419                                    
npm notice 
jupyterlab-drawio-0.6.0.tgz

Yarn configuration loaded.
Node v10.13.0

Building jupyterlab assets (build:prod:minimize)
> node C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\staging\yarn.js install --non-interactive
yarn install v1.15.2
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
Done in 0.42s.

> node C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\staging\yarn.js yarn-deduplicate -s fewer
yarn run v1.15.2
$ C:\Users\xxx\AppData\Local\Continuum\anaconda3\share\jupyter\lab\staging\node_modules\.bin\yarn-deduplicate -s fewer
Done in 1.95s.

> node C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\staging\yarn.js run build:prod:minimize
yarn run v1.15.2
$ ensure-max-old-space webpack --config webpack.prod.minimize.config.js

<--- Last few GCs --->


<--- JS stacktrace --->


#
# Fatal process OOM in insufficient memory to create an Isolate
#

child_process.js:632
    throw err;
    ^

Error: Command failed: C:\Users\xxx\AppData\Local\Continuum\anaconda3\share\jupyter\lab\staging\node_modules\.bin\webpack.CMD --config webpack.prod.minimize.config.js
    at checkExecSyncError (child_process.js:611:11)
    at Object.execFileSync (child_process.js:629:13)
    at Object.<anonymous> (C:\Users\xxx\AppData\Local\Continuum\anaconda3\share\jupyter\lab\staging\node_modules\@jupyterlab\buildutils\lib\ensure-max-old-space.js:38:17)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
    at startup (internal/bootstrap/node.js:285:19)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

JupyterLab failed to build
Traceback (most recent call last):

  File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\debuglog.py", line 47, in debug_logging
    yield

  File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\labextensions.py", line 105, in start
    command=command, app_options=app_options)

  File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\commands.py", line 459, in build
    command=command, clean_staging=clean_staging)

  File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\commands.py", line 669, in build
    raise RuntimeError(msg)

RuntimeError: JupyterLab failed to build

Exiting application: jupyter

This issue can be avoided by using a more modern version of node, or perhaps by setting an environment variable before installing like this:

# on linux/mac:
export NODE_OPTIONS="--max-old-space-size=4086"
# on windows, I think this:
set NODE_OPTIONS="--max-old-space-size=4086"

Thanks, Erik for the answer!