hermes - ✅(Solved) Fix fix(tui): chmod in npm build script breaks hermes --tui on Windows [3 pull requests, 1 participants]

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…
GitHub stats
NousResearch/hermes-agent#22952Fetched 2026-05-11 03:32:09
View on GitHub
Comments
0
Participants
1
Timeline
8
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×3labeled ×3referenced ×2

Running hermes --tui on Windows fails with "TUI build failed" because the npm build script in ui-tui/package.json ends with && chmod +x dist/entry.js, and chmod is not a valid command on Windows.

Error Message

Note: running npm run build directly from git-bash also exits 0 successfully because the shell handles the error gracefully, but Python's subprocess.run(capture_output=True) sees the non-zero exit code from npm's script runner.

Root Cause

The build script in ui-tui/package.json:

"build": "... && chmod +x dist/entry.js"

On Windows, chmod does not exist as a command, causing npm run build to exit with non-zero. The _make_tui_argv() function in hermes_cli/main.py checks result.returncode != 0 and prints "TUI build failed" then exits — even though all actual compilation steps (esbuild, tsc, babel) succeed.

Note: running npm run build directly from git-bash also exits 0 successfully because the shell handles the error gracefully, but Python's subprocess.run(capture_output=True) sees the non-zero exit code from npm's script runner.

Fix Action

Fix

Remove && chmod +x dist/entry.js from the build script in ui-tui/package.json. The execute bit is a cosmetic POSIX convenience — the TUI launcher always invokes it via node dist/entry.js, which works regardless of file permissions.

PR fix notes

PR #22957: fix: remove chmod from TUI build script to fix Windows compatibility

Description (problem / solution / changelog)

Summary

The npm build script in ui-tui/package.json ended with && chmod +x dist/entry.js, which fails on Windows because chmod is not a valid command there. This caused hermes --tui to print "TUI build failed" and exit — even though all actual compilation steps (esbuild, tsc, babel) succeeded.

Changes

  • Removed && chmod +x dist/entry.js from the build script in ui-tui/package.json

Rationale

The execute bit is a cosmetic POSIX convenience. The TUI launcher always invokes the entry point via node dist/entry.js, which works regardless of file permissions. No functional behavior is lost on any platform.

Testing

  • Verified package.json is valid JSON after the change
  • Confirmed chmod is no longer referenced in the build pipeline
  • Build steps (hermes-ink, tsc, babel) remain unchanged

Closes #22952

Changed files

  • ui-tui/package.json (modified, +1/-1)

PR #23038: fix(tui): remove chmod from npm build script to fix Windows build

Description (problem / solution / changelog)

Closing as duplicate. Duplicate of #22957 — same fix (remove chmod from TUI build script for Windows compatibility).

Should have checked is:pr is:open before submitting — lesson learned.

Changed files

  • ui-tui/package.json (modified, +1/-1)

PR #23076: fix(tui): replace chmod with cross-platform node call in build script (#22952)

Description (problem / solution / changelog)

Fixes #22952.

chmod does not exist on Windows, causing hermes --tui to fail with 'TUI build failed'.

Replace with an inline node one-liner that skips the chmod on win32 and applies it on all other platforms:

node -e "process.platform!=='win32'&&require('fs').chmodSync('dist/entry.js',0o755)"

No test needed — the fix is a one-line JSON string change in package.json.

Changed files

  • ui-tui/package.json (modified, +1/-1)

Code Example

"build": "... && chmod +x dist/entry.js"

---

hermes --tui
TUI build failed.
RAW_BUFFERClick to expand / collapse

Summary

Running hermes --tui on Windows fails with "TUI build failed" because the npm build script in ui-tui/package.json ends with && chmod +x dist/entry.js, and chmod is not a valid command on Windows.

Root cause

The build script in ui-tui/package.json:

"build": "... && chmod +x dist/entry.js"

On Windows, chmod does not exist as a command, causing npm run build to exit with non-zero. The _make_tui_argv() function in hermes_cli/main.py checks result.returncode != 0 and prints "TUI build failed" then exits — even though all actual compilation steps (esbuild, tsc, babel) succeed.

Note: running npm run build directly from git-bash also exits 0 successfully because the shell handles the error gracefully, but Python's subprocess.run(capture_output=True) sees the non-zero exit code from npm's script runner.

Fix

Remove && chmod +x dist/entry.js from the build script in ui-tui/package.json. The execute bit is a cosmetic POSIX convenience — the TUI launcher always invokes it via node dist/entry.js, which works regardless of file permissions.

How to reproduce

hermes --tui
TUI build failed.

On Windows only. Compilation steps succeed individually but the final chmod causes the npm script to return non-zero.

Environment

  • Windows 10
  • git-bash (MSYS2)
  • Hermes after commit 09a491464

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