[英]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'
成功了。 我的解決步驟:
conda create -c conda-forge -n <your_env_name> 'python>=3.8,<3.11' 'jupyterlab>=3.10'
conda install -c conda-forge 'nodejs<16.14'
jupyter lab build
。目前是 2022 年 5 月。請注意,當您遇到同樣的問題時,版本變化很大而且非常快:)
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.