nvm-setup
Installation
SKILL.md
nvm Shell Setup
Configure shell profiles so nvm loads automatically on every new terminal session.
Workflow
-
Identify the shell and profile file:
- bash:
~/.bashrc(or~/.bash_profileon macOS) - zsh:
~/.zshrc - fish:
~/.config/fish/config.fish - With XDG_CONFIG_HOME:
$XDG_CONFIG_HOME/bash/bashrcetc.
- bash:
-
Add nvm initialization to the correct profile:
# Required lines for bash/zsh: export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"