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.
Description
Starting from v0.13.0,
hermes update --yeson Windows reports:The built-in Web UI was building successfully in prior versions.
Root Cause
The
web/package.jsonsync-assetsscript uses Unix-only commands (rm -rf,cp -r) that are not available on Windows:This script is called by both
predevandprebuildhooks, so bothnpm run devandnpm run buildfail on Windows.Suggested Fix
Replace with cross-platform Node.js built-in
fsAPI (available since Node 16.7+):This uses
fs.rmSync()andfs.cpSync()which work on all platforms without additional dependencies.Alternative approaches
shx(npx shx rm -rf ...) — adds a dependencyrimraf+cpy-cli— adds dependenciesscripts/sync-assets.mjshelper — cleanest but more filesEnvironment
Workaround
Users can manually edit
web/package.jsonafter each update, or automate the patch in their launcher script.