Build failed with 500, please run 'jupyter lab build' on the server for full output in Jupyter lab

13.5k views Asked by At

I am trying to add an extension in the jupyter lab. I go to extensions tab and click "install" on the extension. After a few seconds i get a pop up saying Build failed with 500, please run 'jupyter lab build' on the server for full output

here is the screenshot of it

could anyone tell me how to resolve it or find the logs related to that error atleast.

3

There are 3 answers

0
Grevster On

Using terminal, try jupyter lab build, which will produce an output on your AppData\Local\Temp folder (if you are on Windows). The log file will give more info on what is causing the failure during the build.

I had the same issue and npm dependencies were the culprit. I have updated conda with conda update -n base -c defaults conda and and yarn with conda install yarn and it solved the issue for me.

Also try looking at this one Jupyter Labs: “RuntimeError: npm dependencies failed to install” When Building.

0
Francisco On

For me this was fixed by pinning down a lower version of nodejs. conda install -c conda-forge 'nodejs<16.14' did the trick. My resolution steps:

  1. Install an environment from scratch conda create -c conda-forge -n <your_env_name> 'python>=3.8,<3.11' 'jupyterlab>=3.10'
  2. Then attempt a nodejs install for example conda install -c conda-forge 'nodejs<16.14'
  3. Attempt to build with jupyter lab build in terminal.

It's currently May 2022. Please note versions change a lot and very fast, when you face this same issue :)

0
Rub On
On the UI (User Interface) of Jupyter Lab you see
Build failed with 524, please run 'jupyter lab build' on the server for full output
You open a console and run
jupyter lab build
Which ends with
An error occurred.
RuntimeError: JupyterLab failed to build
See the log file for details:  /tmp/jupyterlab-debug-2znox977.log
Inside the log you see
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Run again
jupyter lab build --minimize=False

This completes successfully.

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.

In my case, the VM (Virtual Machine) had 3.75GB RAM and before crashing it was using ~3GB (you can see with htop in another console/terminal [image below]).

enter image description here