Skip to content

Conversation

@JamieMagee
Copy link
Contributor

@JamieMagee JamieMagee commented Jan 15, 2026

Summary

Upgrade the project from Node.js 18 to Node.js 24 LTS and from Debian Bullseye to Debian Trixie.

Motivation

Node.js

  • Node.js 18 reached end of life on April 30, 2025
  • Node.js 24 LTS is supported until April 30, 2028

Debian

  • Debian 11 (Bullseye) active support ended August 14, 2024, with LTS support ending August 31, 2026
  • Debian 13 (Trixie) is supported until August 2028, with LTS support until June 2030

Changes

  • Update Docker base images from node:18-bullseye to node:24-trixie
  • Update CI workflow to use Node.js 24
  • Update TypeScript config and type definitions for Node.js 24
  • Add npm overrides for lzma-native@^8.0.6 to fix native addon compatibility
    • decompress-tarxz depends on lzma-native@^4.x which uses nan bindings
    • nan is incompatible with Node.js 24's V8 API
    • lzma-native@8.x uses N-API which is Node version-agnostic

References

@JamieMagee JamieMagee requested a review from jamesiri January 15, 2026 19:08
@JamieMagee
Copy link
Contributor Author

Docker Build Fix

The initial Docker build was failing because Debian Trixie implements PEP 668 (Externally Managed Environments).

What is PEP 668?

PEP 668 marks the system Python installation as "externally managed" to prevent conflicts between system packages (installed via apt) and user packages (installed via pip). This is now enforced in Debian 12+ and Ubuntu 23.04+.

When you try to run pip install on Trixie without opting in, you get:

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install python3-xyz

Fix

Added --break-system-packages flag to all pip3 install commands in both Dockerfile and DevDockerfile. This is appropriate for Docker containers where we are the system and want full control over installed packages.

# Before
RUN pip3 install scancode-toolkit==$SCANCODE_VERSION

# After  
RUN pip3 install --break-system-packages scancode-toolkit==$SCANCODE_VERSION

Upgrade the project from Node.js 18 to Node.js 24 LTS and from Debian
Bullseye to Debian Trixie.

Node.js 18 reached end of life on April 30, 2025. Node.js 24 LTS is
supported until April 30, 2028.

Debian 11 (Bullseye) active support ended August 14, 2024, with LTS
support ending August 31, 2026. Debian 13 (Trixie) is supported until
August 2028, with LTS until June 2030.

Changes:
- Update Docker base images to node:24-trixie
- Update CI workflow to use Node.js 24
- Update TypeScript and type definitions for Node.js 24
- Add npm override for lzma-native@^8.0.6 to fix native addon
  compatibility (decompress-tarxz depends on an older version using
  nan bindings which are incompatible with Node.js 24's V8 API)
Debian Trixie implements PEP 668 (Externally Managed Environments),
which marks the system Python as externally managed. This prevents
pip from installing packages system-wide without explicitly opting in.

Add --break-system-packages flag to all pip3 install commands to
allow installation in the Docker container environment.
Debian Trixie installs pip via apt, which doesn't create a RECORD file.
This prevents pip from uninstalling itself when trying to upgrade.

Since Debian Trixie ships with pip 25.1.1, which is recent enough for
scancode-toolkit, we can simply skip the pip/setuptools/wheel upgrade.
@JamieMagee JamieMagee force-pushed the jamiemagee/upgrade-node24-trixie branch from 013f0b5 to 02e8194 Compare January 15, 2026 21:41
@JamieMagee JamieMagee requested a review from qtomlinson January 22, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants