Skip to content

Pin build-time jupyterlab dependency to <4.6 - #2

Merged
ikfj merged 1 commit into
RCOSDP:release/2024from
yacchin1205:fix/pin-jupyterlab-build-dep
Jul 13, 2026
Merged

ikfj merged 1 commit into
RCOSDP:release/2024from
yacchin1205:fix/pin-jupyterlab-build-dep

Conversation

@yacchin1205

@yacchin1205 yacchin1205 commented Jul 13, 2026 •

Copy link
Copy Markdown
Collaborator

ビルド時の jupyterlab 依存を 4.6 未満に pin します。

Background

jupyterlab 4.6 系がビルドに用いる jupyter-builder の 1.1.0(2026-07-11 リリース)から、Node.js のバージョンチェック(@rspack/core の engines 由来、フォールバック値 ^20.19.0 || >=22.12.0)が入りました。このため、repo2docker がビルドする環境(Node 20.12.2)で本パッケージを git ソースからインストールする際に失敗するようになりました。

Building this extension requires Node.js ^20.19.0 || >=22.12.0 (found v20.12.2). Please upgrade Node.js.

jupyterlab 4.5 系は jupyter-builder に依存しないため(requires_dist で確認)、pin によりこのチェックのコードパス自体がビルド環境に入らなくなります。build-system のみの変更です。(一時対処です - prebuild配布をするなどの対処が考えられます。)

動作確認

以下で動作確認を実施しました。

比較用 — 未修正の release/2024(失敗する):

以下のエラーが出力され、ビルドできないことを確認した。

#24 72.33       ➤ YN0000: ┌ Link step
#24 72.33       ➤ YN0007: │ @jupyter-server/jupyter-resource-usage-root@workspace:. must be built because it never has been before or the last one failed
#24 72.33       ➤ YN0007: │ @fortawesome/fontawesome-free@npm:5.15.4 must be built because it never has been before or the last one failed
#24 72.33       ➤ YN0000: └ Completed in 14s 614ms
#24 72.33       ➤ YN0000: Done with warnings in 38s 731ms
#24 72.33       INFO:hatch_jupyter_builder.utils:> /tmp/pip-build-env-wp97w51q/overlay/bin/jlpm run build:prod
#24 72.33       lerna notice cli v4.0.0
#24 72.33       lerna info versioning independent
#24 72.33       lerna info Executing command in 1 package: "jlpm run build:prod"
#24 72.33       lerna ERR! jlpm run build:prod exited 1 in '@jupyter-server/resource-usage'
#24 72.33       lerna ERR! jlpm run build:prod stderr:
#24 72.33       (Deprecated) 'jupyter labextension build' is deprecated, use 'jupyter-builder build' instead.
#24 72.33        
#24 72.33       @jupyterlab/core-meta was not found in node_modules, so a network download will be used as a fallback. To avoid this, add @jupyter/builder as a devDependency instead of @jupyterlab/builder.
#24 72.33        
#24 72.33       Building extension in .
#24 72.33       Building this extension requires Node.js ^20.19.0 || >=22.12.0 (found v18.20.5). Please upgrade Node.js.
#24 72.33       /tmp/pip-build-env-wp97w51q/overlay/lib/python3.10/site-packages/jupyter_builder/debug_log_file_mixin.py:62: UserWarning: An error occurred.
#24 72.33         warnings.warn("An error occurred.", stacklevel=1)
#24 72.33       /tmp/pip-build-env-wp97w51q/overlay/lib/python3.10/site-packages/jupyter_builder/debug_log_file_mixin.py:63: UserWarning: RuntimeError: Building this extension requires Node.js ^20.19.0 || >=22.12.0 (found v18.20.5). Please upgrade Node.js.
#24 72.33         warnings.warn(msg[-1].strip(), stacklevel=1)
#24 72.33       /tmp/pip-build-env-wp97w51q/overlay/lib/python3.10/site-packages/jupyter_builder/debug_log_file_mixin.py:64: UserWarning: See the log file for details: jupyterlab-debug.log
#24 72.33         warnings.warn(f"See the log file for details: {log_path}", stacklevel=1)
#24 72.33       lerna ERR! jlpm run build:prod exited 1 in '@jupyter-server/resource-usage'
#24 72.33       Traceback (most recent call last):
#24 72.33         File "/srv/conda/envs/notebook/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
#24 72.33           main()
#24 72.33         File "/srv/conda/envs/notebook/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
#24 72.33           json_out["return_val"] = hook(**hook_input["kwargs"])
#24 72.33         File "/srv/conda/envs/notebook/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 178, in prepare_metadata_for_build_wheel
#24 72.33           whl_basename = backend.build_wheel(metadata_directory, config_settings)
#24 72.33         File "/tmp/pip-build-env-wp97w51q/overlay/lib/python3.10/site-packages/hatchling/build.py", line 58, in build_wheel
#24 72.33           return os.path.basename(next(builder.build(directory=wheel_directory, versions=["standard"])))
#24 72.33         File "/tmp/pip-build-env-wp97w51q/overlay/lib/python3.10/site-packages/hatchling/builders/plugin/interface.py", line 149, in build
#24 72.33           build_hook.initialize(version, build_data)
#24 72.33         File "/tmp/pip-build-env-wp97w51q/normal/lib/python3.10/site-packages/hatch_jupyter_builder/plugin.py", line 94, in initialize
#24 72.33           raise e
#24 72.33         File "/tmp/pip-build-env-wp97w51q/normal/lib/python3.10/site-packages/hatch_jupyter_builder/plugin.py", line 89, in initialize
#24 72.33           build_func(self.target_name, version, **build_kwargs)
#24 72.33         File "/tmp/pip-build-env-wp97w51q/normal/lib/python3.10/site-packages/hatch_jupyter_builder/utils.py", line 117, in npm_builder
#24 72.33           run([*npm_cmd, "run", build_cmd], cwd=str(abs_path))
#24 72.33         File "/tmp/pip-build-env-wp97w51q/normal/lib/python3.10/site-packages/hatch_jupyter_builder/utils.py", line 231, in run
#24 72.33           return subprocess.check_call(cmd, **kwargs)
#24 72.33         File "/srv/conda/envs/notebook/lib/python3.10/subprocess.py", line 369, in check_call
#24 72.33           raise CalledProcessError(retcode, cmd)
#24 72.33       subprocess.CalledProcessError: Command '['/tmp/pip-build-env-wp97w51q/overlay/bin/jlpm', 'run', 'build:prod']' returned non-zero exit status 1.
#24 72.33       [end of output]
#24 72.33   
#24 72.33   note: This error originates from a subprocess, and is likely not a problem with pip.
#24 72.50 error: metadata-generation-failed
#24 72.50 
#24 72.50 × Encountered error while generating package metadata.
#24 72.50 ╰─> See above for output.
#24 72.50 
#24 72.50 note: This is an issue with the package mentioned above, not pip.
#24 72.50 hint: See above for details.
#24 ERROR: process "/bin/sh -c ./binder/postBuild" did not complete successfully: exit code: 1
------
 > [19/21] RUN ./binder/postBuild:
72.33       [end of output]
72.33   
72.33   note: This error originates from a subprocess, and is likely not a problem with pip.
72.50 error: metadata-generation-failed
72.50 
72.50 × Encountered error while generating package metadata.
72.50 ╰─> See above for output.
72.50 
72.50 note: This is an issue with the package mentioned above, not pip.
72.50 hint: See above for details.
------
Dockerfile:161

次に、この修正ブランチ:

上記のURLは成功することを確認した。

@yacchin1205 yacchin1205 added the bug Something isn't working label Jul 13, 2026
@yacchin1205
yacchin1205 requested a review from ikfj July 13, 2026 09:55
@ikfj
ikfj merged commit 9c2f847 into RCOSDP:release/2024 Jul 13, 2026
8 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants