[英]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.