Hi,
I am trying to install extensions to Jupyter Lab on my Mac but it always fails to build.
Example with jupyterlab_variableinspector
I directly installed the extension on Jupyter Lab and then clicked on build
.
I got this error message:
Build failed with 500, please run 'jupyter lab build' on the server for full output.
Therefore, I ran jupyter lab build
on my terminal and it fails to build as well.
Error message from my Terminal
> [LabBuildApp] JupyterLab 3.0.14
> [LabBuildApp] Building in /Users/fcomte/opt/anaconda3/share/jupyter/lab
> [LabBuildApp] Building jupyterlab assets (production, minimized)
> Build failed.
>
> Troubleshooting: If the build failed due to an out-of-memory error, you
> may be able to fix it by disabling the `dev_build` and/or `minimize` options.
>
> If you are building via the `jupyter lab build` command, you can disable
> these options like so:
>
> jupyter lab build --dev-build=False --minimize=False
>
> You can also disable these options for all JupyterLab builds by adding these
> lines to a Jupyter config file named `jupyter_config.py`:
>
> c.LabBuildApp.minimize = False
> c.LabBuildApp.dev_build = False
>
> If you don't already have a `jupyter_config.py` file, you can create one by
> adding a blank file of that name to any of the Jupyter config directories.
> The config directories can be listed by running:
>
> jupyter --paths
>
> Explanation:
>
> - `dev-build`: This option controls whether a `dev` or a more streamlined
> `production` build is used. This option will default to `False` (i.e., the
> `production` build) for most users. However, if you have any labextensions
> installed from local files, this option will instead default to `True`.
> Explicitly setting `dev-build` to `False` will ensure that the `production`
> build is used in all circumstances.
>
> - `minimize`: This option controls whether your JS bundle is minified
> during the Webpack build, which helps to improve JupyterLab's overall
> performance. However, the minifier plugin used by Webpack is very memory
> intensive, so turning it off may help the build finish successfully in
> low-memory environments.
>
> An error occured.
>
> RuntimeError: JupyterLab failed to build
>
> See the log file for details: /var/folders/k3/hsdwh5b12jbcpx8l62mcvqpm0000gn/T/jupyterlab-debug-lqvpmfe9.log
Log file
> [LabBuildApp] Building in /Users/fcomte/opt/anaconda3/share/jupyter/lab
> [LabBuildApp] Node v12.4.0
>
> [LabBuildApp] Yarn configuration loaded.
> [LabBuildApp] Building jupyterlab assets (production, minimized)
> [LabBuildApp] > node /Users/fcomte/opt/anaconda3/lib/python3.8/site-packages/jupyterlab/staging/yarn.js install --non-interactive
> [LabBuildApp] yarn install v1.21.1
> [1/5] Validating package.json...
> [2/5] Resolving packages...
> success Already up-to-date.
> Done in 0.42s.
>
> [LabBuildApp] > node /Users/fcomte/opt/anaconda3/lib/python3.8/site-packages/jupyterlab/staging/yarn.js yarn-deduplicate -s fewer --fail
> [LabBuildApp] yarn run v1.21.1
> $ /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/.bin/yarn-deduplicate -s fewer --fail
> Done in 1.19s.
>
> [LabBuildApp] > node /Users/fcomte/opt/anaconda3/lib/python3.8/site-packages/jupyterlab/staging/yarn.js run build:prod:minimize
> [LabBuildApp] yarn run v1.21.1
> $ webpack --config webpack.prod.minimize.config.js
> assets by status 10.1 MiB [cached] 115 assets
> orphan modules 4.72 MiB [orphan] 1254 modules
> runtime modules 104 KiB 14 modules
> built modules 13.4 MiB (javascript) 4.47 KiB (consume-shared) 4.43 KiB (share-init) [built]
> modules by path ./node_modules/ 13.3 MiB
> cacheable modules 13.3 MiB 973 modules
> 3 modules
> consume-shared-module modules 4.47 KiB
> modules by path consume shared module (default) @jupyterlab/ 3.53 KiB 41 modules
> modules by path consume shared module (default) @lumino/ 588 bytes 14 modules
> provide-module modules 4.43 KiB 108 modules
> modules by path ./build/ 23.4 KiB
> ./build/bootstrap.js 3.78 KiB [built] [code generated]
> ./build/index.out.js + 1 modules 19.6 KiB [built] [code generated]
> 4 modules
>
> WARNING in ./node_modules/vega-lite/build/src/index.js 5:0-30
> Should not import the named export 'version' (reexported as 'version') from default-exporting module (only default export is available soon)
> @ consume shared module (default) vega-lite@^4.0.2 (strict) (fallback: ./node_modules/vega-lite/build/src/index.js)
> @ ./node_modules/vega-embed/build/vega-embed.module.js 6:0-44 189:15-29
> @ consume shared module (default) vega-embed@^6.2.1 (strict) (fallback: ./node_modules/vega-embed/build/vega-embed.module.js)
> @ ./node_modules/@jupyterlab/vega5-extension/lib/index.js 166:28-48
> @ consume shared module (default) @jupyterlab/vega5-extension@~3.0.7 (strict) (fallback: ./node_modules/@jupyterlab/vega5-extension/lib/index.js)
> @ ./build/index.out.js 171:16-54
> @ ./build/bootstrap.js
>
> ERROR in resolving fallback for shared module @lckr/jupyterlab_variableinspector
> Module not found: Error: Can't resolve '@lckr/jupyterlab_variableinspector' in '/Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/build'
> resolve '@lckr/jupyterlab_variableinspector' in '/Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/build'
> Parsed request is a module
> using description file: /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/build/package.json (relative path: .)
> Field 'browser' doesn't contain a valid alias configuration
> resolve as module
> /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/build/node_modules doesn't exist or is not a directory
> looking for modules in /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules
> single file module
> using description file: /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/package.json (relative path: ./node_modules/@lckr/jupyterlab_variableinspector)
> no extension
> Field 'browser' doesn't contain a valid alias configuration
> /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector is not a file
> .js
> Field 'browser' doesn't contain a valid alias configuration
> /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector.js doesn't exist
> .json
> Field 'browser' doesn't contain a valid alias configuration
> /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector.json doesn't exist
> .wasm
> Field 'browser' doesn't contain a valid alias configuration
> /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector.wasm doesn't exist
> existing directory /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector
> using description file: /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector/package.json (relative path: .)
> using description file: /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/package.json (relative path: ./node_modules/@lckr/jupyterlab_variableinspector)
> no extension
> Field 'browser' doesn't contain a valid alias configuration
> /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector is not a file
> .js
> Field 'browser' doesn't contain a valid alias configuration
> /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector.js doesn't exist
> .json
> Field 'browser' doesn't contain a valid alias configuration
> /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector.json doesn't exist
> .wasm
> Field 'browser' doesn't contain a valid alias configuration
> /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector.wasm doesn't exist
> as directory
> existing directory /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector
> using description file: /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector/package.json (relative path: .)
> use ./lib/index.js from main in package.json
> using description file: /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector/package.json (relative path: ./lib/index.js)
> no extension
> Field 'browser' doesn't contain a valid alias configuration
> /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector/lib/index.js doesn't exist
> .js
> Field 'browser' doesn't contain a valid alias configuration
> /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector/lib/index.js.js doesn't exist
> .json
> Field 'browser' doesn't contain a valid alias configuration
> /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector/lib/index.js.json doesn't exist
> .wasm
> Field 'browser' doesn't contain a valid alias configuration
> /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector/lib/index.js.wasm doesn't exist
> as directory
> /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector/lib/index.js doesn't exist
> using path: /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector/index
> using description file: /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector/package.json (relative path: ./index)
> no extension
> Field 'browser' doesn't contain a valid alias configuration
> /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector/index doesn't exist
> .js
> Field 'browser' doesn't contain a valid alias configuration
> /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector/index.js doesn't exist
> .json
> Field 'browser' doesn't contain a valid alias configuration
> /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector/index.json doesn't exist
> .wasm
> Field 'browser' doesn't contain a valid alias configuration
> /Users/fcomte/opt/anaconda3/share/jupyter/lab/staging/node_modules/@lckr/jupyterlab_variableinspector/index.wasm doesn't exist
> /Users/fcomte/opt/anaconda3/share/jupyter/lab/node_modules doesn't exist or is not a directory
> /Users/fcomte/opt/anaconda3/share/jupyter/node_modules doesn't exist or is not a directory
> /Users/fcomte/opt/anaconda3/share/node_modules doesn't exist or is not a directory
> /Users/fcomte/opt/anaconda3/node_modules doesn't exist or is not a directory
> /Users/fcomte/opt/node_modules doesn't exist or is not a directory
> /Users/fcomte/node_modules doesn't exist or is not a directory
> /Users/node_modules doesn't exist or is not a directory
> /node_modules doesn't exist or is not a directory
>
> webpack 5.31.2 compiled with 1 error and 1 warning in 39015 ms
>
> asset index.css 16.1 KiB [compared for emit] (name: index)
> asset index.js 0 bytes [compared for emit] [minimized] (name: index)
> Entrypoint index 16.1 KiB = index.css 16.1 KiB index.js 0 bytes
> ./node_modules/@jupyterlab/theme-dark-extension/style/index.css 50 bytes [built] [code generated]
> css ./node_modules/css-loader/dist/cjs.js!./node_modules/@jupyterlab/theme-dark-extension/style/variables.css 15.3 KiB [code generated]
> css ./node_modules/css-loader/dist/cjs.js!./node_modules/@jupyterlab/theme-dark-extension/style/base.css 472 bytes [code generated]
> css ./node_modules/css-loader/dist/cjs.js!./node_modules/@jupyterlab/theme-dark-extension/style/index.css 342 bytes [code generated]
> webpack 5.31.2 compiled successfully in 3072 ms
>
> asset index.css 15 KiB [compared for emit] (name: index)
> asset index.js 0 bytes [compared for emit] [minimized] (name: index)
> Entrypoint index 15 KiB = index.css 15 KiB index.js 0 bytes
> ./node_modules/@jupyterlab/theme-light-extension/style/index.css 50 bytes [built] [code generated]
> css ./node_modules/css-loader/dist/cjs.js!./node_modules/@jupyterlab/theme-light-extension/style/variables.css 14.2 KiB [code generated]
> css ./node_modules/css-loader/dist/cjs.js!./node_modules/@jupyterlab/theme-light-extension/style/base.css 472 bytes [code generated]
> css ./node_modules/css-loader/dist/cjs.js!./node_modules/@jupyterlab/theme-light-extension/style/index.css 342 bytes [code generated]
> webpack 5.31.2 compiled successfully in 2874 ms
> error Command failed with exit code 1.
> info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
>
> [LabBuildApp] JupyterLab failed to build
> [LabBuildApp] Traceback (most recent call last):
>
> [LabBuildApp] File "/Users/fcomte/opt/anaconda3/lib/python3.8/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
> yield
>
> [LabBuildApp] File "/Users/fcomte/opt/anaconda3/lib/python3.8/site-packages/jupyterlab/labapp.py", line 166, in start
> raise e
>
> [LabBuildApp] File "/Users/fcomte/opt/anaconda3/lib/python3.8/site-packages/jupyterlab/labapp.py", line 162, in start
> build(name=self.name, version=self.version,
>
> [LabBuildApp] File "/Users/fcomte/opt/anaconda3/lib/python3.8/site-packages/jupyterlab/commands.py", line 469, in build
> return handler.build(name=name, version=version, static_url=static_url,
>
> [LabBuildApp] File "/Users/fcomte/opt/anaconda3/lib/python3.8/site-packages/jupyterlab/commands.py", line 678, in build
> raise RuntimeError(msg)
>
> [LabBuildApp] RuntimeError: JupyterLab failed to build
>
> [LabBuildApp] Exiting application: JupyterLab
Do you have any idea how I could fix this issue ?
Thank you.