Skip to content

install.sh: hint at root-owned npm cache when desktop npm install fails - #39688

Merged
OutThisLife merged 1 commit into
NousResearch:mainfrom
enesilhaydin:desktop-install-npm-cache-hint
Jun 7, 2026
Merged

install.sh: hint at root-owned npm cache when desktop npm install fails#39688
OutThisLife merged 1 commit into
NousResearch:mainfrom
enesilhaydin:desktop-install-npm-cache-hint

Conversation

@enesilhaydin

Copy link
Copy Markdown
Contributor

Summary

When the desktop build can't install its workspace dependencies, install_desktop prints a single line — Desktop workspace npm install failed — and aborts. If the underlying npm failure is the (surprisingly common) root-owned cache problem, the user is left staring at a wall of npm output with no hint that it's a local permissions issue rather than a problem with the installer.

The trigger: ~/.npm holds cache entries owned by root, left behind by an earlier sudo npm / sudo npx. A later non-root npm install then can't write those cache paths and fails. npm surfaces this as EEXIST / "File exists" with errno -13, which is actually EACCES (permission denied).

What this changes

On the desktop-install failure path only, print a short, targeted hint pointing at the fix:

sudo chown -R "$(id -un)" ~/.npm && npm cache verify

…followed by the manual rebuild command. This mirrors the "Run manually: …" guidance already used elsewhere in the same function. No behavior change on success, and the stage stays a hard failure as intended.

Why not just make the stage non-fatal?

The hard return 1 is deliberate — see the comment above install_desktop: a silent skip produces a "complete" install with no app and a confusing launch-time error. This keeps that contract and only makes the failure self-explanatory.

Notes

Scoped to the bash installer (scripts/install.sh), the path most users hit; scripts/install.ps1 carries the same message and could get a parity hint in a follow-up. Verified with bash -n.

When apps/desktop's `npm ci`/`npm install` fails, install_desktop printed a
single "Desktop workspace npm install failed" line and aborted, leaving the
user with a wall of raw npm output. A common trigger is a root-owned ~/.npm
cache left by an earlier `sudo npm`/`sudo npx`: the non-root install then
cannot write the shared cache, and npm reports it as EEXIST / "File exists"
while the real errno is EACCES (-13) -- so it reads like an installer bug.

Add a targeted remediation hint on that failure path pointing at:

    sudo chown -R "$(id -un)" ~/.npm && npm cache verify

followed by the manual rebuild command. The stage stays a hard failure by
design (a silent skip yields a "complete" install with no app); only the
failure output changes.
@alt-glitch alt-glitch added type/docs Documentation improvements area/config Config system, migrations, profiles P3 Low — cosmetic, nice to have labels Jun 5, 2026
@OutThisLife
OutThisLife enabled auto-merge (squash) June 7, 2026 17:51
@OutThisLife

Copy link
Copy Markdown
Collaborator

danke

@OutThisLife
OutThisLife merged commit f3af489 into NousResearch:main Jun 7, 2026
20 checks passed
@enesilhaydin
enesilhaydin deleted the desktop-install-npm-cache-hint branch June 8, 2026 06:34
changman pushed a commit to changman/hermes-agent that referenced this pull request Jun 10, 2026
…ls (NousResearch#39688)

When apps/desktop's `npm ci`/`npm install` fails, install_desktop printed a
single "Desktop workspace npm install failed" line and aborted, leaving the
user with a wall of raw npm output. A common trigger is a root-owned ~/.npm
cache left by an earlier `sudo npm`/`sudo npx`: the non-root install then
cannot write the shared cache, and npm reports it as EEXIST / "File exists"
while the real errno is EACCES (-13) -- so it reads like an installer bug.

Add a targeted remediation hint on that failure path pointing at:

    sudo chown -R "$(id -un)" ~/.npm && npm cache verify

followed by the manual rebuild command. The stage stays a hard failure by
design (a silent skip yields a "complete" install with no app); only the
failure output changes.
alt-glitch pushed a commit that referenced this pull request Jun 14, 2026
…ls (#39688)

When apps/desktop's `npm ci`/`npm install` fails, install_desktop printed a
single "Desktop workspace npm install failed" line and aborted, leaving the
user with a wall of raw npm output. A common trigger is a root-owned ~/.npm
cache left by an earlier `sudo npm`/`sudo npx`: the non-root install then
cannot write the shared cache, and npm reports it as EEXIST / "File exists"
while the real errno is EACCES (-13) -- so it reads like an installer bug.

Add a targeted remediation hint on that failure path pointing at:

    sudo chown -R "$(id -un)" ~/.npm && npm cache verify

followed by the manual rebuild command. The stage stays a hard failure by
design (a silent skip yields a "complete" install with no app); only the
failure output changes.
davidgut1982 pushed a commit to davidgut1982/hermes-agent that referenced this pull request Jun 17, 2026
…ls (NousResearch#39688)

When apps/desktop's `npm ci`/`npm install` fails, install_desktop printed a
single "Desktop workspace npm install failed" line and aborted, leaving the
user with a wall of raw npm output. A common trigger is a root-owned ~/.npm
cache left by an earlier `sudo npm`/`sudo npx`: the non-root install then
cannot write the shared cache, and npm reports it as EEXIST / "File exists"
while the real errno is EACCES (-13) -- so it reads like an installer bug.

Add a targeted remediation hint on that failure path pointing at:

    sudo chown -R "$(id -un)" ~/.npm && npm cache verify

followed by the manual rebuild command. The stage stays a hard failure by
design (a silent skip yields a "complete" install with no app); only the
failure output changes.
T02200059 pushed a commit to T02200059/hermes-agent that referenced this pull request Jun 18, 2026
…ls (NousResearch#39688)

When apps/desktop's `npm ci`/`npm install` fails, install_desktop printed a
single "Desktop workspace npm install failed" line and aborted, leaving the
user with a wall of raw npm output. A common trigger is a root-owned ~/.npm
cache left by an earlier `sudo npm`/`sudo npx`: the non-root install then
cannot write the shared cache, and npm reports it as EEXIST / "File exists"
while the real errno is EACCES (-13) -- so it reads like an installer bug.

Add a targeted remediation hint on that failure path pointing at:

    sudo chown -R "$(id -un)" ~/.npm && npm cache verify

followed by the manual rebuild command. The stage stays a hard failure by
design (a silent skip yields a "complete" install with no app); only the
failure output changes.
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…ls (NousResearch#39688)

When apps/desktop's `npm ci`/`npm install` fails, install_desktop printed a
single "Desktop workspace npm install failed" line and aborted, leaving the
user with a wall of raw npm output. A common trigger is a root-owned ~/.npm
cache left by an earlier `sudo npm`/`sudo npx`: the non-root install then
cannot write the shared cache, and npm reports it as EEXIST / "File exists"
while the real errno is EACCES (-13) -- so it reads like an installer bug.

Add a targeted remediation hint on that failure path pointing at:

    sudo chown -R "$(id -un)" ~/.npm && npm cache verify

followed by the manual rebuild command. The stage stays a hard failure by
design (a silent skip yields a "complete" install with no app); only the
failure output changes.
santhreal pushed a commit to santhreal/hermes-agent that referenced this pull request Jul 13, 2026
…ls (NousResearch#39688)

When apps/desktop's `npm ci`/`npm install` fails, install_desktop printed a
single "Desktop workspace npm install failed" line and aborted, leaving the
user with a wall of raw npm output. A common trigger is a root-owned ~/.npm
cache left by an earlier `sudo npm`/`sudo npx`: the non-root install then
cannot write the shared cache, and npm reports it as EEXIST / "File exists"
while the real errno is EACCES (-13) -- so it reads like an installer bug.

Add a targeted remediation hint on that failure path pointing at:

    sudo chown -R "$(id -un)" ~/.npm && npm cache verify

followed by the manual rebuild command. The stage stays a hard failure by
design (a silent skip yields a "complete" install with no app); only the
failure output changes.
donbowman pushed a commit to donbowman/hermes-agent that referenced this pull request Jul 13, 2026
…ls (NousResearch#39688)

When apps/desktop's `npm ci`/`npm install` fails, install_desktop printed a
single "Desktop workspace npm install failed" line and aborted, leaving the
user with a wall of raw npm output. A common trigger is a root-owned ~/.npm
cache left by an earlier `sudo npm`/`sudo npx`: the non-root install then
cannot write the shared cache, and npm reports it as EEXIST / "File exists"
while the real errno is EACCES (-13) -- so it reads like an installer bug.

Add a targeted remediation hint on that failure path pointing at:

    sudo chown -R "$(id -un)" ~/.npm && npm cache verify

followed by the manual rebuild command. The stage stays a hard failure by
design (a silent skip yields a "complete" install with no app); only the
failure output changes.
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
…ls (NousResearch#39688)

When apps/desktop's `npm ci`/`npm install` fails, install_desktop printed a
single "Desktop workspace npm install failed" line and aborted, leaving the
user with a wall of raw npm output. A common trigger is a root-owned ~/.npm
cache left by an earlier `sudo npm`/`sudo npx`: the non-root install then
cannot write the shared cache, and npm reports it as EEXIST / "File exists"
while the real errno is EACCES (-13) -- so it reads like an installer bug.

Add a targeted remediation hint on that failure path pointing at:

    sudo chown -R "$(id -un)" ~/.npm && npm cache verify

followed by the manual rebuild command. The stage stays a hard failure by
design (a silent skip yields a "complete" install with no app); only the
failure output changes.
leewenjie pushed a commit to leewenjie/hermes-agent that referenced this pull request Aug 7, 2026
…ls (NousResearch#39688)

When apps/desktop's `npm ci`/`npm install` fails, install_desktop printed a
single "Desktop workspace npm install failed" line and aborted, leaving the
user with a wall of raw npm output. A common trigger is a root-owned ~/.npm
cache left by an earlier `sudo npm`/`sudo npx`: the non-root install then
cannot write the shared cache, and npm reports it as EEXIST / "File exists"
while the real errno is EACCES (-13) -- so it reads like an installer bug.

Add a targeted remediation hint on that failure path pointing at:

    sudo chown -R "$(id -un)" ~/.npm && npm cache verify

followed by the manual rebuild command. The stage stays a hard failure by
design (a silent skip yields a "complete" install with no app); only the
failure output changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles P3 Low — cosmetic, nice to have type/docs Documentation improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants