Skip to content

switch to jupyter-build, bump NodeJS from 18 to 22#287

Merged
rapids-bot[bot] merged 1 commit into
mainfrom
fix/use-jupyter-build
Jun 23, 2026
Merged

switch to jupyter-build, bump NodeJS from 18 to 22#287
rapids-bot[bot] merged 1 commit into
mainfrom
fix/use-jupyter-build

Conversation

@jameslamb

Copy link
Copy Markdown
Member

Fixes #286

This project's been using jupyter labextension build at build time, but that's been deprecated and jupyter-builder (which pulls the build-time parts out of jupyterlab) is now recommended. See https://jupyterlab.readthedocs.io/en/4.6.x/extension/extension_migration.html#migrating-to-jupyter-builder

This PR's motivated by an unrelated SSL issue in downloading some packages... switching to jupyter-builder also removes that download and unblocks CI. But switching from a deprecated to an officially-supported pattern seems worth doing.

This also updates to NodeJS 22 in build environments. jupyter/builder uses rspack which uses some patterns that require at least NodeJS 22, otherwise you hit this in builds:

INFO:hatch_jupyter_builder.utils:> /tmp/build-env-_mdxzadu/bin/jlpm run build:prod
Building extension in .
/__w/jupyterlab-nvdashboard/jupyterlab-nvdashboard/node_modules/@jupyter/builder/lib/build-labextension.js:79
const core_1 = require("@rspack/core");
               ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /__w/jupyterlab-nvdashboard/jupyterlab-nvdashboard/node_modules/@rspack/core/dist/index.js from /__w/jupyterlab-nvdashboard/jupyterlab-nvdashboard/node_modules/@jupyter/builder/lib/build-labextension.js not supported.
Instead change the require of index.js in /__w/jupyterlab-nvdashboard/jupyterlab-nvdashboard/node_modules/@jupyter/builder/lib/build-labextension.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/__w/jupyterlab-nvdashboard/jupyterlab-nvdashboard/node_modules/@jupyter/builder/lib/build-labextension.js:79:16) {
  code: 'ERR_REQUIRE_ESM'
}

That change has no impact on users, NodeJS is only a build-time dependency here and its version doesn't meaningfully impact the built artifacts.

@jameslamb jameslamb changed the title WIP: switch to jupyter-build, bump NodeJS from 18 to 22 switch to jupyter-build, bump NodeJS from 18 to 22 Jun 22, 2026
Comment thread yarn.lock
version: 0.5.7
resolution: "@discoveryjs/json-ext@npm:0.5.7"
checksum: 2176d301cc258ea5c2324402997cf8134ebb212469c0d397591636cea8d3c02f2b3cf9fd58dcb748c7a0dade77ebdc1b10284fa63e608c033a1db52fddc69918
"@emnapi/core@npm:1.10.0":

@jameslamb jameslamb Jun 22, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the changes in this file were made automatically by the hooks in pre-commit, based on the changes I made manually in package.json.

@jameslamb jameslamb marked this pull request as ready for review June 22, 2026 17:29
@jameslamb jameslamb requested review from a team as code owners June 22, 2026 17:29
@jameslamb jameslamb requested a review from bdice June 22, 2026 17:29

@ncclementi ncclementi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating this @jameslamb

@jameslamb

Copy link
Copy Markdown
Member Author

/merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

builds failing: SSL errors download jupyterlab/core-meta

3 participants