From 0a8f3271da72ac20deece13db0b15ad9ae17f4dd Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 28 Oct 2025 18:20:23 +0000 Subject: [PATCH] Add npm configuration to match pnpm setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Configure npm to use user-local directories similar to pnpm: - NPM_CONFIG_PREFIX: $HOME/.local/share/npm for global packages - NPM_CONFIG_CACHE: $HOME/.cache/npm for package cache - Add npm bin directory to PATH This ensures npm global packages install to user-controlled locations without requiring elevated permissions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- chezmoi/dot_zshrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/chezmoi/dot_zshrc b/chezmoi/dot_zshrc index 567e6af..280b6b0 100644 --- a/chezmoi/dot_zshrc +++ b/chezmoi/dot_zshrc @@ -19,6 +19,15 @@ case ":$PATH:" in *) export PATH="$PNPM_HOME:$PATH" ;; esac +# NPM configuration (similar to pnpm) +export NPM_CONFIG_PREFIX="$HOME/.local/share/npm" +export NPM_CONFIG_CACHE="$HOME/.cache/npm" + +case ":$PATH:" in + *":$NPM_CONFIG_PREFIX/bin:"*) ;; + *) export PATH="$NPM_CONFIG_PREFIX/bin:$PATH" ;; +esac + if [[ "$TERM" == *ghostty* ]]; then export TERM=xterm-256color fi