簡體   English   中英

構建失敗並顯示 500,請在服務器上運行“jupyter lab build”以獲得 Jupyter 實驗室中的完整 output

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

我正在嘗試在 jupyter 實驗室中添加一個擴展。 我 go 到擴展選項卡並單擊擴展上的“安裝”。 幾秒鍾后,我彈出一個提示,說Build failed with 500, please run 'jupyter lab build' on the server for full output

這是它的截圖

誰能告訴我如何解決它或至少找到與該錯誤相關的日志。

使用終端,嘗試jupyter lab build ,它將在您的AppData\Local\Temp文件夾中生成輸出(如果您在 Windows 上)。 日志文件將提供有關在構建過程中導致失敗的原因的更多信息。

我有同樣的問題,npm 依賴是罪魁禍首。 我已經用conda update -n base -c defaults conda和 yarn 更新了conda install yarn ,它為我解決了這個問題。

還可以嘗試查看這個Jupyter Labs:“RuntimeError: npm dependencies failed to install”When Building

對我來說,這是通過固定較低版本的 nodejs 來解決的。 conda install -c conda-forge 'nodejs<16.14'成功了。 我的解決步驟:

  1. 從頭開始安裝環境conda create -c conda-forge -n <your_env_name> 'python>=3.8,<3.11' 'jupyterlab>=3.10'
  2. 然后嘗試安裝 nodejs,例如 conda conda install -c conda-forge 'nodejs<16.14'
  3. 嘗試在終端中使用jupyter lab build

目前是 2022 年 5 月。請注意,當您遇到同樣的問題時,版本變化很大而且非常快:)

在 Jupyter Lab 的 UI(用戶界面)上你會看到
Build failed with 524, please run 'jupyter lab build' on the server for full output
你打開一個控制台並運行
jupyter lab build
結尾是
An error occurred.
RuntimeError: JupyterLab failed to build
See the log file for details:  /tmp/jupyterlab-debug-2znox977.log
在你看到的日志里面
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
再次運行
jupyter lab build --minimize=False

這成功完成。

解釋:

  • dev-build :此選項控制是使用dev版本還是使用更簡化的production版本。 對於大多數用戶,此選項將默認為False (即, production版本)。 但是,如果您從本地文件安裝了任何 labextensions,則此選項將默認為True dev-build顯式設置為False將確保在所有情況下都使用production構建。

  • minimize :此選項控制在 Webpack 構建期間是否縮小您的 JS 包,這有助於提高 JupyterLab 的整體性能。 然而,Webpack 使用的 minifier 插件非常 memory 密集,所以關閉它可能有助於在低內存環境中成功完成構建。

在我的例子中,VM(虛擬機)有 3.75GB RAM,在崩潰之前它使用了 ~3GB(你可以在另一個控制台/終端中使用htop查看 [下圖])。

在此處輸入圖像描述

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM