Skip to content

Node version is inconsistent across local, package, and Docker config #50

Closed

Description

@hacksynth

Problem

The project declares different Node.js major versions in different places.

Files:

  • .nvmrc
  • .node-version
  • package.json (engines.node)
  • Dockerfile

Current state:

.nvmrc              -> 20
.node-version      -> 20
package.json       -> engines.node = ">=18.0.0"
Dockerfile         -> FROM node:25-alpine

This means local development defaults to Node 20, npm accepts Node 18+, and the production Docker image runs Node 25.

Why This Is Risky

Node 25 is an odd-numbered non-LTS release line. Running production Docker images on Node 25 while local development uses Node 20 can cause behavior differences in Prisma engines and other native/transitive dependencies.

According to the official Node.js Release Working Group schedule:

  • Node 22.x is still an LTS release line, with maintenance until 2027-04-30.
  • Node 24.x is Active LTS, with maintenance until 2028-04-30.
  • Node 25.x is not promoted to LTS and reaches EOL on 2026-06-01.
  • Node 20.x reached EOL on 2026-04-30.

Reference: https://github.com/nodejs/Release#release-schedule

Suggested Fix

Unify the project on a supported LTS major version.

Recommended short-term option: Node 22 LTS, because it is conservative and still maintained.

Suggested changes:

Dockerfile:      FROM node:22-alpine
.nvmrc:          22
.node-version:   22
package.json:    engines.node = ">=20.0.0"

Notes:

  • engines.node = ">=20.0.0" is a minimum compatibility floor, but the documented/default development and Docker runtime should be Node 22.
  • Avoid Node 25 for production Docker images because it is not an LTS line.
  • Avoid recommending Node 20 as the target runtime because it is already EOL as of 2026-04-30, even if it may still satisfy some dependency minimums.

Alternative: standardize on the current Active LTS line, Node 24, if the project wants the longest support window. In that case all four locations should use/document Node 24 consistently.

Acceptance Criteria

  • .nvmrc, .node-version, package.json engines, and Dockerfile no longer point to conflicting Node major versions.
  • Dockerfile no longer uses node:25-alpine.
  • The chosen runtime is an LTS line.
  • README/docs, if they mention Node version requirements, match the chosen policy.
  • CI still passes under the chosen Node version.

Activity

  1. hacksynth commented on May 2, 2026

    @hacksynth
    OwnerAuthor

    @claude 请处理这个 issue。

    请按 issue 描述和 acceptance criteria 落地修复,保持改动范围聚焦;完成后请提交 PR,并在本 issue 回复 PR 链接。

  2. claude commented on May 2, 2026

    @claude

    Claude finished @hacksynth's task in 1m 7s —— View job • claude/issue-50-20260502-1624 • Create PR ➔


    Fixing Node.js Version Inconsistency

    • Gather context and read relevant files
    • Update .nvmrc to 22
    • Update .node-version to 22
    • Update package.json engines.node to >=20.0.0
    • Update Dockerfile to use node:22-alpine
    • Check README/docs for Node version mentions (none found)
    • Commit and push changes
    • Create PR

    All four config files are now unified on Node 22 LTS. Summary of changes:

    File Before After
    .nvmrc 20 22
    .node-version 20 22
    package.json engines.node >=18.0.0 >=20.0.0
    Dockerfile node:25-alpine node:22-alpine

    No Node version mentions were found in README.md or README_CN.md.

    |

  3. hacksynth commented on May 2, 2026

    @hacksynth
    OwnerAuthor

    @claude 这个分支还不满足 issue #50 的 acceptance criteria。当前 claude/issue-50-20260502-1624 只改了 .nvmrc、.node-version、package.json 和 Dockerfile,但仓库里仍有 Node 20 文档/CI 配置,例如 docs/getting-started.md、docs/desktop-app.md、docs/self-hosting.md、.github/workflows/ci.yml、.github/workflows/tauri-check.yml、.github/workflows/security.yml、.github/workflows/release.yml、.github/workflows/android-apk.yml。请继续更新这些 Node version mentions/setup-node 配置到 Node 22 策略后再开 PR。

  4. claude commented on May 2, 2026

    @claude

    Claude finished @hacksynth's task in 1m 55s —— View job • claude/issue-50-20260502-1626 • Create PR ➔


    Updating Node Version References Across Docs and CI

    • Gather context and read relevant files
    • Update docs/getting-started.md — Node.js 18+; Node.js 20 is recommended → Node.js 20+; Node.js 22 LTS is recommended
    • Update docs/desktop-app.md — 3 references: build host, PATH requirement, BUNDLED_NODE_VERSION example value
    • Update docs/self-hosting.md — Install Node.js 20 → Install Node.js 22 LTS
    • Commit and push changes
    • .github/workflows/ files — see note below

    Workflow Files Require Manual Update

    I'm unable to modify .github/workflows/ files due to GitHub App permissions. The following changes need to be made manually:

    File Line(s) Change
    .github/workflows/ci.yml 35, 46, 57, 70, 83 node-version: '20' → node-version: '22'
    .github/workflows/tauri-check.yml 47 node-version: '20' → node-version: '22'
    .github/workflows/security.yml 39 node-version: '20' → node-version: '22'
    .github/workflows/release.yml 50, 268 node-version: '20' → node-version: '22'
    .github/workflows/release.yml 169, 402 Text: Node.js 20+ → Node.js 22+
    .github/workflows/android-apk.yml 58 node-version: '20' → node-version: '22'

    You can find more information about this limitation in the FAQ.


    The docs changes are committed and pushed. Once you've updated the workflow files manually, you can open a PR combining both sets of changes:

    • claude/issue-50-20260502-1626

  5. hacksynth commented on May 2, 2026

    @hacksynth
    OwnerAuthor

    @claude 返工分支 claude/issue-50-20260502-1626 只包含文档改动,丢掉了第一版 claude/issue-50-20260502-1624 里的核心配置改动(.nvmrc、.node-version、package.json engines、Dockerfile)。请再创建/更新一个完整分支,必须同时包含:1) .nvmrc/.node-version -> 22;2) Dockerfile ->
    ode:22-alpine;3) package engines.node -> >=20.0.0;4) docs 中 Node 20/18 表述更新为 Node 22 策略;5) GitHub Actions setup-node 如仍固定 20,也更新为 22。完成后再给 Create PR 链接。

  6. claude commented on May 2, 2026

    @claude

    Claude finished @hacksynth's task in 5m 13s —— View job • claude/issue-50-20260502-1630 • Create PR ➔


    Complete Node 22 LTS Branch

    • Read relevant files to check current state
    • Update .nvmrc → 22
    • Update .node-version → 22
    • Update Dockerfile → node:22-alpine
    • Update package.json engines.node → >=20.0.0
    • Update docs/getting-started.md — Node.js 18+/20 → Node.js 20+/22 LTS
    • Update docs/desktop-app.md — 3 references: build host, PATH requirement, BUNDLED_NODE_VERSION example
    • Update docs/self-hosting.md — Install Node.js 20 → Install Node.js 22 LTS
    • GitHub Actions workflow files — see note below
    • Commit and push all changes

    Summary of changes in this branch

    File Before After
    .nvmrc 20 22
    .node-version 20 22
    Dockerfile node:25-alpine node:22-alpine
    package.json engines.node >=18.0.0 >=20.0.0
    docs/getting-started.md Node.js 18+; Node.js 20 is recommended Node.js 20+; Node.js 22 LTS is recommended
    docs/desktop-app.md Node.js 20 (build host), Node.js 20+ on PATH, BUNDLED_NODE_VERSION=v20.18.1 Node.js 22 LTS (build host), Node.js 22+ on PATH, BUNDLED_NODE_VERSION=v22.15.0
    docs/self-hosting.md Install Node.js 20 Install Node.js 22 LTS

    GitHub Actions workflow files — manual update required

    The GitHub App does not have the workflows permission required to push changes to .github/workflows/ files. Please apply these changes manually:

    File Change needed
    .github/workflows/ci.yml Lines 35, 46, 57, 70, 83: node-version: '20' → node-version: '22'
    .github/workflows/tauri-check.yml Line 47: node-version: '20' → node-version: '22'
    .github/workflows/security.yml Line 39: node-version: '20' → node-version: '22'
    .github/workflows/release.yml Lines 50, 268: node-version: '20' → node-version: '22'; Lines 169, 402: Node.js 20+ → Node.js 22+
    .github/workflows/android-apk.yml Line 58: node-version: '20' → node-version: '22'

    You can find more information about this limitation in the FAQ.

    • claude/issue-50-20260502-1630

  7. hacksynth commented on May 2, 2026

    @hacksynth
    OwnerAuthor

    @claude claude/issue-50-20260502-1630 仍未满足我前面反馈里的完整要求。现在 .nvmrc、.node-version、Dockerfile、package、docs 已更新,但以下固定 Node 20 残留仍在:

    • .github/workflows/ci.yml 多处 node-version: '20'
    • .github/workflows/tauri-check.yml
    • .github/workflows/security.yml
    • .github/workflows/release.yml
    • .github/workflows/android-apk.yml
    • .github/workflows/release.yml release note 文案中的 Node.js 20+
    • src-tauri/src/lib.rs 启动失败提示中的 Node.js 20+

    请再创建一个完整分支,同时包含当前分支的配置/docs 改动,并把上述 CI/setup-node 和运行时提示更新到 Node 22 策略。这个 issue 的目标是消除仓库内 Node major 版本不一致,不应让 CI/release 文案继续固定 Node 20。

  8. claude commented on May 2, 2026

    @claude

    Claude finished @hacksynth's task in 4m 25s —— View job • claude/issue-50-20260502-1636 • Create PR ➔


    Completing Node 22 LTS Unification (Full Branch)

    • Gather context and read relevant files
    • Apply config changes: .nvmrc, .node-version, Dockerfile, package.json
    • Apply docs changes: docs/getting-started.md, docs/desktop-app.md, docs/self-hosting.md
    • Update src-tauri/src/lib.rs runtime failure message (Node.js 20+ → Node.js 22+)
    • Commit and push all changes
    • GitHub Actions workflow files — see note below

    Summary of changes in this branch

    File Before After
    .nvmrc 20 22
    .node-version 20 22
    Dockerfile node:25-alpine node:22-alpine
    package.json engines.node >=18.0.0 >=20.0.0
    docs/getting-started.md Node.js 18+; Node.js 20 is recommended Node.js 20+; Node.js 22 LTS is recommended
    docs/desktop-app.md Node.js 20 (build host), Node.js 20+ on PATH, BUNDLED_NODE_VERSION=v20.18.1 Node.js 22 LTS (build host), Node.js 22+ on PATH, BUNDLED_NODE_VERSION=v22.15.0
    docs/self-hosting.md Install Node.js 20 Install Node.js 22 LTS
    src-tauri/src/lib.rs line 166 请安装 Node.js 20+ 并加入 PATH 请安装 Node.js 22+ 并加入 PATH

    GitHub Actions workflow files — manual update required

    The GitHub App does not have the workflows permission, so changes to .github/workflows/ files cannot be pushed. Please apply these changes manually to complete the fix:

    File Change needed
    .github/workflows/ci.yml Lines 35, 46, 57, 70, 83: node-version: '20' → node-version: '22'
    .github/workflows/tauri-check.yml Line 47: node-version: '20' → node-version: '22'
    .github/workflows/security.yml Line 39: node-version: '20' → node-version: '22'
    .github/workflows/release.yml Lines 50, 268: node-version: '20' → node-version: '22'; Lines 169, 402: Node.js 20+ → Node.js 22+
    .github/workflows/android-apk.yml Line 58: node-version: '20' → node-version: '22'

    This is a known GitHub App limitation — see FAQ for details. You can apply the workflow changes directly on main (or this branch) and then open the PR.


    • claude/issue-50-20260502-1636

  9. hacksynth commented on May 2, 2026

    @hacksynth
    OwnerAuthor

    @claude 新分支 claude/issue-50-20260502-1636 仍然不能开 PR:它只改了 8 个文件,.github/workflows/*.yml 里的固定 Node 20 仍全部存在,包括 ci.yml、tauri-check.yml、security.yml、release.yml、android-apk.yml 的 node-version: '20',以及 release 文案里的 Node.js 20+。

    这个 issue 的 acceptance criteria 是消除仓库内 Node major 版本不一致;保留 CI/release workflow 固定 Node 20 仍不满足。如果 GitHub App 确实没有 workflows 权限,请在 issue 明确标记为权限阻塞,不要继续给只能部分满足的 Create PR 分支。若能处理,请提交包含 workflow 更新的完整分支。

  10. claude commented on May 2, 2026

    @claude

    Claude finished @hacksynth's task in 4m 49s —— View job • claude/issue-50-20260502-1643 • Create PR ➔


    Node 22 LTS — Confirmed Permission Blocker for Workflow Files

    • Gather context and read relevant files
    • Apply config changes: .nvmrc, .node-version, Dockerfile, package.json
    • Apply docs changes: docs/getting-started.md, docs/desktop-app.md, docs/self-hosting.md
    • Update src-tauri/src/lib.rs runtime error message
    • Attempt workflow file updates — push rejected by GitHub (see blocker below)

    🚫 Confirmed Permission Blocker

    All non-workflow changes are committed and pushed to claude/issue-50-20260502-1643.

    The push of .github/workflows/*.yml changes was rejected by GitHub with:

    refusing to allow a GitHub App to create or update workflow
    `.github/workflows/android-apk.yml` without `workflows` permission
    

    This is a hard GitHub API restriction — the Claude Code GitHub App token does not include the workflows OAuth scope, so it cannot push commits that modify .github/workflows/ files regardless of what files are edited locally. This is not a file-editing limitation; it is a push-level rejection.

    To unblock: You can either:

    1. Apply the workflow changes manually on this branch (exact diff below), then open the PR.
    2. Grant the workflows permission to the GitHub App installation in your repository settings, which would allow future runs to push workflow changes.

    Exact workflow changes needed (all '20' → '22')

    .github/workflows/ci.yml — lines 35, 46, 57, 70, 83:

              node-version: '22'   # was '20'

    .github/workflows/tauri-check.yml — line 47:

              node-version: '22'   # was '20'

    .github/workflows/security.yml — line 39:

              node-version: '22'   # was '20'

    .github/workflows/android-apk.yml — line 58:

              node-version: '22'   # was '20'

    .github/workflows/release.yml — lines 50, 268:

              node-version: '22'   # was '20'

    .github/workflows/release.yml — line 169:

              2. Node.js 22+ must be installed and available in PATH.
    

    .github/workflows/release.yml — line 402:

                Windows portable builds require Node.js 22+ in PATH because the Next.js standalone server is launched locally.
    

    Non-workflow changes already on the branch

    File Change
    .nvmrc 20 → 22
    .node-version 20 → 22
    Dockerfile node:25-alpine → node:22-alpine
    package.json engines.node >=18.0.0 → >=20.0.0
    docs/getting-started.md Node.js 18+/20 → Node.js 20+/22 LTS
    docs/desktop-app.md Node.js 20 → Node.js 22 LTS (3 references)
    docs/self-hosting.md Install Node.js 20 → Install Node.js 22 LTS
    src-tauri/src/lib.rs startup error Node.js 20+ → Node.js 22+

    Once you add the workflow changes to the branch, you can open a PR:

    • claude/issue-50-20260502-1643

  11. added a commit that references this issue on May 2, 2026
    458f129
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