Skip to content

chore: evaluate and plan Node.js upgrade (v20 → v22 LTS) #746

Description

@ksalamy

Background

Dash5 currently runs Node.js v20.19.0 (pinned via .nvmrc). Several development console warnings trace back to a known source-map parsing bug in Node.js v20:

```
Invalid source map. Only conformant source maps can be used to find the original code.
Cause: TypeError [ERR_INVALID_ARG_TYPE]: The "payload" argument must be of type object. Received null
```

This is a Node.js bug where `findSourceMap` throws on certain malformed source maps generated by webpack/Next.js externals. It does not affect production but does clutter the dev console.

The Fix

The definitive fix is Node.js PR #56299 — "lib: suppress source map lookup exceptions" — which landed in:

  • Node.js v22.14.0 (LTS "Jod")
  • Node.js v23.6.0
  • Backport to v20.x merged Aug 2025 (targeting v20.19.x+)

Next.js 15 also shipped a partial mitigation in PR #75713, but some edge cases persist below Node v22.14.

Node.js v22 LTS Status

Node.js v22 ("Jod") entered Active LTS in October 2024 and is supported through April 2027. Node.js v20 ("Iron") enters Maintenance LTS in October 2025 and EOL in April 2026 — meaning our current v20 is already approaching end-of-maintenance.

Upgrade Path to Evaluate

  1. Update `.nvmrc` from `20` → `22`
  2. Audit `engines` field in all `package.json` files in the monorepo
  3. Run full test suite (`yarn test`) on Node 22 — flag any failures
  4. Check Docker base image used on `tethysdash2` (`node:20-alpine` → `node:22-alpine`)
  5. Verify `dash5-production` container builds and starts cleanly
  6. Update CI (`.github/workflows/`) Node version matrix if applicable
  7. Deploy to staging (`tethysdash2`) and smoke-test before promoting to production

Acceptance Criteria

  • Dev console no longer shows `ERR_INVALID_ARG_TYPE` source map warnings
  • All existing tests pass on Node 22
  • Docker production image updated and verified on staging
  • `.nvmrc` updated to `22`

Activity

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

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