fix: configure npm prefix to /usr/local for system-wide package access

- Set npm prefix to /usr/local (system location) instead of user-specific ~/.npm-global
- Ensures all users can access installed npm packages
- Fixes issue where packages installed to one user's home directory
- All npm global packages now available system-wide to all users

This ensures that after running setup.sh:
- pi, claude, and other tools are at /usr/local/bin/
- Accessible to all users (pastilhas, andrepadez, etc.)
- New users automatically get access too
This commit is contained in:
2026-03-04 02:38:18 +00:00
parent a8976ad8fb
commit e521d8214f
+5
View File
@@ -591,6 +591,11 @@ else
SYSTEM_NPM="$(which npm)"
fi
# Set npm prefix to system location so all users can access packages
echo " Configuring npm global prefix to /usr/local..."
sudo "$SYSTEM_NPM" config set prefix /usr/local
ok "npm prefix set to /usr/local"
# Pi (coding agent)
if has pi; then
skip "pi (@mariozechner/pi-coding-agent)"