Skip to content

Conversation

@rsp2k
Copy link

@rsp2k rsp2k commented Jan 25, 2026

Summary

So I was trying to get Perspective running in JupyterLab 4 and kept hitting this wall where the widget just... wouldn't load. Dug into the browser console and found the culprit - there's a version constraint on @jupyter-widgets/base that's rejecting version 6.x.

The thing is, ipywidgets 8.x has been the stable release since October 2022. It ships @jupyter-widgets/base 6.0.11, but the current constraint in the jupyterlab package is ">2 <5" - which obviously doesn't include 6.x.

Two-line fix: bump the upper bound from <5 to <7.

Changes

  • packages/jupyterlab/package.json: @jupyter-widgets/base from ">2 <5" to ">2 <7"
  • pnpm-workspace.yaml: same change in the catalog entry

Did it work?

Ran through the semver math to make sure I wasn't breaking existing setups:

  • 6.0.11 (ipywidgets 8.x) satisfies ">2 <7" - yep
  • 4.1.7 (ipywidgets 7.x) still satisfies ">2 <7" - still works

Then spun up a fresh Docker container (node:20 devcontainer) to validate the dependency resolution in isolation:

  • pnpm install resolved all 1805 packages with no version conflicts
  • The workspace catalog and package.json constraints played nice together

So both ipywidgets 7.x and 8.x environments should be happy now.

Related issues

This is adjacent to #2060 (Support ipywidgets 8) and #2307 (Support JupyterLab 4) - those got closed but this specific version constraint issue slipped through.

Test plan

  • Semver validation for both ipywidgets versions
  • Docker container: pnpm install succeeds (1805 packages)
  • CI validates full build

…ts 8.x

The JupyterLab extension fails to load with ipywidgets 8.x because
the version constraint ">2 <5" rejects @jupyter-widgets/base 6.x
which is provided by ipywidgets 8.x (the current stable release).

Error in browser console:
  Unsatisfied version 6.0.11 from @jupyter-widgets/jupyterlab-manager
  of shared singleton module @jupyter-widgets/base (required >=2 not(^2) <5)

This causes widgets to fail with:
  TypeError: undefined is not iterable

Update the constraint from ">2 <5" to ">2 <7" to support both
ipywidgets 7.x (@jupyter-widgets/base 4.x) and ipywidgets 8.x
(@jupyter-widgets/base 6.x).

Fixes compatibility with:
- JupyterLab 4.x
- ipywidgets 8.x (current stable)

Signed-off-by: Ryan Malloy <ryan@supported.systems>
@rsp2k rsp2k force-pushed the fix/jupyterlab-ipywidgets8-compat branch from 926b655 to b8f4051 Compare January 25, 2026 21:04
@rsp2k rsp2k marked this pull request as ready for review January 25, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant