Skip to content

Pin or document the supported Node 22 minimum #19

Description

@mdroidian

Problem

The repository currently declares:

  • "node": ">=22" in package.json
  • "Node 22" in the README
  • node-version: "22" in CI, which resolves to the latest available Node 22 release

That suggests any Node 22 release is supported, but the current Vitest/jsdom dependency graph cannot run under Node 22.6.0. Prototype test workers fail before executing tests.

The initial failure is:

Error [ERR_REQUIRE_ESM]: require() of ES Module
@exodus/bytes/encoding-lite.js
from html-encoding-sniffer/lib/html-encoding-sniffer.js not supported

Enabling Node 22.6's experimental require(ESM) support moves the failure to:

TypeError: webidl.util.markAsUncloneable is not a function
at undici/lib/web/cache/cachestorage.js

The same complete compatibility runs pass under Node 22.23.2:

  • root tests: 32 passed
  • Copy for LaTeX: 113 passed
  • Properties Panel: 100 passed, 1 skipped
  • pnpm build
  • pnpm prepare:artifacts

GitHub CI also passes because actions/setup-node currently resolves 22 to a recent Node 22 release.

Reproduction

  1. Use Node 22.6.0.
  2. Run pnpm install --frozen-lockfile.
  3. Run pnpm test.
  4. Observe Vitest workers fail while loading jsdom dependencies.

Expected

The documented and enforced Node requirement identifies a version that can run the repository's current install, tests, build, and artifact preparation locally.

Suggested resolution

  1. Determine the actual minimum supported Node 22 release from the current dependency graph.
  2. Either:
    • raise engines.node to that minimum, or
    • pin a known-good Node 22 release for local development and CI.
  3. Update the README and add an .nvmrc or .node-version if the repository chooses a pinned release.
  4. Keep CI aligned with the documented version instead of allowing node-version: "22" to drift silently.

Acceptance criteria

  • A fresh install on the documented Node version can run:
    • pnpm test
    • pnpm build
    • pnpm prepare:artifacts
  • package.json, README guidance, and CI agree on the supported version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions