Skip to content

fix: add ~/.npm-global/bin and NPM_CONFIG_PREFIX to PATH bootstrap#1

Open
apurv-1 wants to merge 1 commit into
mainfrom
fix/path-env-missing-npm-global-bin
Open

fix: add ~/.npm-global/bin and NPM_CONFIG_PREFIX to PATH bootstrap#1
apurv-1 wants to merge 1 commit into
mainfrom
fix/path-env-missing-npm-global-bin

Conversation

@apurv-1

@apurv-1 apurv-1 commented Feb 22, 2026

Copy link
Copy Markdown
Owner

The CLI PATH bootstrap (candidateBinDirs in path-env.ts) was missing ~/.npm-global/bin, the standard directory where npm global installs land for non-root users. This caused the install script to report "openclaw is not discoverable on PATH" on fresh VPS installs.

Also respect the NPM_CONFIG_PREFIX environment variable for custom npm prefix configurations.

Summary

Describe the problem and fix in 2–5 bullets:

  • Problem:
  • Why it matters:
  • What changed:
  • What did NOT change (scope boundary):

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #
  • Related #

User-visible / Behavior Changes

List user-visible changes (including defaults/config).
If none, write None.

Security Impact (required)

  • New permissions/capabilities? (Yes/No)
  • Secrets/tokens handling changed? (Yes/No)
  • New/changed network calls? (Yes/No)
  • Command/tool execution surface changed? (Yes/No)
  • Data access scope changed? (Yes/No)
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS:
  • Runtime/container:
  • Model/provider:
  • Integration/channel (if any):
  • Relevant config (redacted):

Steps

Expected

Actual

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios:
  • Edge cases checked:
  • What you did not verify:

Compatibility / Migration

  • Backward compatible? (Yes/No)
  • Config/env changes? (Yes/No)
  • Migration needed? (Yes/No)
  • If yes, exact upgrade steps:

Failure Recovery (if this breaks)

  • How to disable/revert this change quickly:
  • Files/config to restore:
  • Known bad symptoms reviewers should watch for:

Risks and Mitigations

List only real risks for this PR. Add/remove entries as needed. If none, write None.

  • Risk:
    • Mitigation:

The CLI PATH bootstrap (candidateBinDirs in path-env.ts) was missing
~/.npm-global/bin, the standard directory where npm global installs
land for non-root users. This caused the install script to report
"openclaw is not discoverable on PATH" on fresh VPS installs.

Also respect the NPM_CONFIG_PREFIX environment variable for custom
npm prefix configurations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant