Files
Codeman/.changeset/install-npm-prefix-writable.md
T
Devvyn 26487f0ec5 fix(cli-install): install npm CLIs to ~/.local when the npm global prefix is not writable
installEnv() only redirected NPM_CONFIG_PREFIX inside the Docker container
(CODEMAN_IN_CONTAINER=1). On a native install with a root-owned system node
(prefix /usr) `npm install -g @deepseek-ai/dsh` run as the server user died
with EACCES (exit 243), so DeepSeek, pi and other npm-based CLIs could not be
installed from Settings. Ask npm for its global prefix and, when the server
user cannot write it, redirect to $HOME/.local like the container path does.
An operator-set NPM_CONFIG_PREFIX and a writable prefix are left alone.
2026-10-09 18:41:58 +08:00

446 B

aicodeman
aicodeman
patch

Installing an npm-based CLI from Settings (DeepSeek's dsh, pi, ...) no longer fails with EACCES on a native install whose system node keeps its global prefix under /usr. When the npm global prefix is not writable by the Codeman user, the install now goes to ~/.local (where Codeman already looks for CLIs), as the Docker deployment already did. A prefix you set yourself, or one that is writable, is left alone.