hermes - 💡(How to fix) Fix Dockerfile installs Node 20 (apt nodejs), but scripts/install.sh pins Node 22; web/ build broken on debian:13.4 base in v2026.4.30

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

The Dockerfile and the scripts/install.sh installer disagree on Node version, and the disagreement breaks the web/ asset build on v2026.4.30.

  • scripts/install.sh:43 pins NODE_VERSION="22" — this is what the user-facing one-liner installer uses
  • Dockerfile:17 does apt-get install -y --no-install-recommends ... nodejs npm ... on the debian:13.4 base, which resolves to Node 20.x (Debian 13 ships Node 20)

Result: when building from the upstream Dockerfile at tag v2026.4.30, the web/ build fails with what looks like a missing-dependency error but is actually a silent engine-mismatch:

[vite]: Rollup failed to resolve import "clsx" from "/opt/hermes/web/src/lib/utils.ts".

The actual root cause shows up earlier in the npm install output as a warning:

npm WARN EBADENGINE Unsupported engine {
  package: '[email protected]',
  required: { node: '>=22' },
  current: { node: 'v20.19.2', npm: '9.2.0' }
}

[email protected] is a transitive dep that requires Node ≥22. npm only warns on engine mismatch, so the install completes and 346 web/ packages "added" successfully — but the resolver chain is silently broken. Vite/Rollup then fails on the first import that walks through it, surfacing as the misleading "can't resolve clsx" error (clsx itself is fine and listed in web/package.json).

Error Message

Result: when building from the upstream Dockerfile at tag v2026.4.30, the web/ build fails with what looks like a missing-dependency error but is actually a silent engine-mismatch: npm WARN EBADENGINE Unsupported engine { [email protected] is a transitive dep that requires Node ≥22. npm only warns on engine mismatch, so the install completes and 346 web/ packages "added" successfully — but the resolver chain is silently broken. Vite/Rollup then fails on the first import that walks through it, surfacing as the misleading "can't resolve clsx" error (clsx itself is fine and listed in web/package.json).

  • The error message ("can't resolve clsx") is misleading — it took ~30 minutes of debugging to trace it back to the EBADENGINE warning earlier in the log.

Root Cause

  • The Dockerfile is the canonical reference for downstream container distributors. Anyone building from it on v2026.4.30 hits this.
  • The error message ("can't resolve clsx") is misleading — it took ~30 minutes of debugging to trace it back to the EBADENGINE warning earlier in the log.
  • If scripts/install.sh is the source of truth for required Node version, the Dockerfile should match. If the Dockerfile is, the installer should match.

Code Example

[vite]: Rollup failed to resolve import "clsx" from "/opt/hermes/web/src/lib/utils.ts".

---

npm WARN EBADENGINE Unsupported engine {
  package: '[email protected]',
  required: { node: '>=22' },
  current: { node: 'v20.19.2', npm: '9.2.0' }
}

---

git clone https://github.com/NousResearch/hermes-agent.git
cd hermes-agent
git checkout v2026.4.30
docker build -t hermes-test .
# fails at STEP 18/27 (web build), exit 1

---

RUN apt-get update && \
    apt-get install -y --no-install-recommends \
    build-essential curl python3 ripgrep ffmpeg gcc python3-dev libffi-dev \
    procps git openssh-client docker-cli tini ca-certificates gnupg && \
    curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
    apt-get install -y --no-install-recommends nodejs && \
    rm -rf /var/lib/apt/lists/*
RAW_BUFFERClick to expand / collapse

Summary

The Dockerfile and the scripts/install.sh installer disagree on Node version, and the disagreement breaks the web/ asset build on v2026.4.30.

  • scripts/install.sh:43 pins NODE_VERSION="22" — this is what the user-facing one-liner installer uses
  • Dockerfile:17 does apt-get install -y --no-install-recommends ... nodejs npm ... on the debian:13.4 base, which resolves to Node 20.x (Debian 13 ships Node 20)

Result: when building from the upstream Dockerfile at tag v2026.4.30, the web/ build fails with what looks like a missing-dependency error but is actually a silent engine-mismatch:

[vite]: Rollup failed to resolve import "clsx" from "/opt/hermes/web/src/lib/utils.ts".

The actual root cause shows up earlier in the npm install output as a warning:

npm WARN EBADENGINE Unsupported engine {
  package: '[email protected]',
  required: { node: '>=22' },
  current: { node: 'v20.19.2', npm: '9.2.0' }
}

[email protected] is a transitive dep that requires Node ≥22. npm only warns on engine mismatch, so the install completes and 346 web/ packages "added" successfully — but the resolver chain is silently broken. Vite/Rollup then fails on the first import that walks through it, surfacing as the misleading "can't resolve clsx" error (clsx itself is fine and listed in web/package.json).

Repro

git clone https://github.com/NousResearch/hermes-agent.git
cd hermes-agent
git checkout v2026.4.30
docker build -t hermes-test .
# fails at STEP 18/27 (web build), exit 1

Suggested fixes (any one is sufficient)

1. Install Node 22 in the Dockerfile to match scripts/install.sh policy:

RUN apt-get update && \
    apt-get install -y --no-install-recommends \
    build-essential curl python3 ripgrep ffmpeg gcc python3-dev libffi-dev \
    procps git openssh-client docker-cli tini ca-certificates gnupg && \
    curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
    apt-get install -y --no-install-recommends nodejs && \
    rm -rf /var/lib/apt/lists/*
  1. Or pin language-tags (or whichever transitive dep introduced the Node 22 floor) to a Node 20-compatible version.

  2. Or document the divergence and update scripts/install.sh's NODE_VERSION to 20 if the project actually supports Node 20.

Confirmed: option 1 fixes the web build cleanly

I built a downstream image with a verbatim mirror of the v2026.4.30 Dockerfile plus only the NodeSource Node 22 swap above. Result:

  • npm install runs without EBADENGINE warnings
  • cd web && npm run build succeeds
  • hermes --version reports Hermes Agent v0.12.0 (2026.4.30) correctly

Why this matters

  • The Dockerfile is the canonical reference for downstream container distributors. Anyone building from it on v2026.4.30 hits this.
  • The error message ("can't resolve clsx") is misleading — it took ~30 minutes of debugging to trace it back to the EBADENGINE warning earlier in the log.
  • If scripts/install.sh is the source of truth for required Node version, the Dockerfile should match. If the Dockerfile is, the installer should match.

Environment

  • Base image: debian:13.4
  • Tag tested: v2026.4.30
  • Build tool: podman 5.x, also reproduced under docker
  • npm version in container: 9.2.0 (debian's default with Node 20)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix Dockerfile installs Node 20 (apt nodejs), but scripts/install.sh pins Node 22; web/ build broken on debian:13.4 base in v2026.4.30