hermes - ✅(Solved) Fix [Bug] Web UI build fails on Windows: `rm` is not recognized in `sync-assets` script [1 pull requests, 1 comments, 2 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#25073Fetched 2026-05-14 03:49:19
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
labeled ×4commented ×1cross-referenced ×1

Starting from v0.13.0, hermes update --yes on Windows reports:

→ Building web UI...
  ⚠ Web UI build failed (hermes web will not be available)
  Build error:
  'rm' is not recognized as an internal or external command,
  operable program or batch file.

The built-in Web UI was building successfully in prior versions.

Error Message

→ Building web UI... ⚠ Web UI build failed (hermes web will not be available) Build error: 'rm' is not recognized as an internal or external command, operable program or batch file.

Root Cause

The web/package.json sync-assets script uses Unix-only commands (rm -rf, cp -r) that are not available on Windows:

"sync-assets": "rm -rf public/fonts public/ds-assets && cp -r node_modules/@nous-research/ui/dist/fonts public/fonts && cp -r node_modules/@nous-research/ui/dist/assets public/ds-assets"

This script is called by both predev and prebuild hooks, so both npm run dev and npm run build fail on Windows.

Fix Action

Workaround

Users can manually edit web/package.json after each update, or automate the patch in their launcher script.

PR fix notes

PR #25090: fix(web): use Node.js for sync-assets instead of Unix rm/cp

Description (problem / solution / changelog)

Summary

sync-assets used Unix rm which is not available on Windows CMD/PowerShell, causing the web UI build to fail with 'rm is not recognized'.

Replace with a small Node.js script (web/scripts/sync-assets.js) that uses Node.js built-in fs APIs for cross-platform file operations.

Changes

  • web/scripts/sync-assets.js (new): ESM script that replicates the sync-assets logic
  • web/package.json: Updated sync-assets script to call node scripts/sync-assets.js

Closes #25073

Changed files

  • web/package.json (modified, +1/-1)
  • web/scripts/sync-assets.js (added, +34/-0)

Code Example

Building web UI...
Web UI build failed (hermes web will not be available)
  Build error:
  'rm' is not recognized as an internal or external command,
  operable program or batch file.

---

"sync-assets": "rm -rf public/fonts public/ds-assets && cp -r node_modules/@nous-research/ui/dist/fonts public/fonts && cp -r node_modules/@nous-research/ui/dist/assets public/ds-assets"

---

"sync-assets": "node -e \"const fs=require('fs');function rm(d){if(fs.existsSync(d))fs.rmSync(d,{recursive:true,force:true})}function cp(s,d){fs.cpSync(s,d,{recursive:true})}rm('public/fonts');rm('public/ds-assets');cp('node_modules/@nous-research/ui/dist/fonts','public/fonts');cp('node_modules/@nous-research/ui/dist/assets','public/ds-assets')\""
RAW_BUFFERClick to expand / collapse

Description

Starting from v0.13.0, hermes update --yes on Windows reports:

→ Building web UI...
  ⚠ Web UI build failed (hermes web will not be available)
  Build error:
  'rm' is not recognized as an internal or external command,
  operable program or batch file.

The built-in Web UI was building successfully in prior versions.

Root Cause

The web/package.json sync-assets script uses Unix-only commands (rm -rf, cp -r) that are not available on Windows:

"sync-assets": "rm -rf public/fonts public/ds-assets && cp -r node_modules/@nous-research/ui/dist/fonts public/fonts && cp -r node_modules/@nous-research/ui/dist/assets public/ds-assets"

This script is called by both predev and prebuild hooks, so both npm run dev and npm run build fail on Windows.

Suggested Fix

Replace with cross-platform Node.js built-in fs API (available since Node 16.7+):

"sync-assets": "node -e \"const fs=require('fs');function rm(d){if(fs.existsSync(d))fs.rmSync(d,{recursive:true,force:true})}function cp(s,d){fs.cpSync(s,d,{recursive:true})}rm('public/fonts');rm('public/ds-assets');cp('node_modules/@nous-research/ui/dist/fonts','public/fonts');cp('node_modules/@nous-research/ui/dist/assets','public/ds-assets')\""

This uses fs.rmSync() and fs.cpSync() which work on all platforms without additional dependencies.

Alternative approaches

  • Use shx (npx shx rm -rf ...) — adds a dependency
  • Use rimraf + cpy-cli — adds dependencies
  • Create a scripts/sync-assets.mjs helper — cleanest but more files

Environment

  • OS: Windows 11
  • Node.js: v20+
  • Hermes Agent: v0.13.0
  • Install method: ZIP download (non-git)

Workaround

Users can manually edit web/package.json after each update, or automate the patch in their launcher script.

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 - ✅(Solved) Fix [Bug] Web UI build fails on Windows: `rm` is not recognized in `sync-assets` script [1 pull requests, 1 comments, 2 participants]