Fix "zsh: command not found: nvm"

By Zennith Tech Lab Published 2026-05-22
ZshNVMTerminalNode.js

Did your Node Version Manager suddenly vanish in your shell? Repair the zsh paths instantly by sourcing nvm configurations.

Quick NVM Active Source

Load NVM in your login shell by adding its configuration scripts to the user ~/.zshrc file to fix command not found errors.

# Step 1: Open Terminal Configuration File

Zsh shells do not load configurations automatically unless they are defined within the central user environment profile. Edit your config file:

``bash # Open configuration file for editing nano ~/.zshrc `

# Step 2: Append NVM Environment Definition

Scroll to the very bottom of the file and insert this initialization script block:

`bash # Load NVM scripts dynamically into login shell paths export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # Load nvm [ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" # Load completion `

Press Ctrl + O to write out changes, then exit nano via Ctrl + X.

# Step 3: Apply Configurations

Apply these changes to your active terminal process without resetting the shell session:

`bash source ~/.zshrc `

Test if the executable path is loaded successfully:

`bash nvm --version ``

# Related Developers Diagnostics

Utilize client tools for configuration audits:

  • Review long code blocks using Word & Character Counter.