If you recently installed nvm - Node Version Manager package using brew and when you run the nvm command you get - zsh: command not found: nvm on your macOS system. Well, the reason is you have not set the zsh profile file to locate the installed nvm package.
Let's see what we see when we install nvm using the command: brew install nvm
code2care@mac ~ % brew install nvm
==> Downloading https://github.com/creationix/nvm/archive/v0.38.0.tar.gz
Already downloaded: /Users/code2care/Library/Caches/Homebrew/downloads/1956ad942b9ae30bf5f0d9ccb61b90c5ae466dc790b470b5f766eed629b43947--nvm-0.38.0.tar.gz
==> Caveats
Please note that upstream has asked us to make explicit managing
nvm via Homebrew is unsupported by them and you should check any
problems against the standard nvm install method prior to reporting.
You should create NVM's working directory if it doesn't exist:
mkdir ~/.nvm
Add the following to ~/.zshrc or your desired shell
configuration file:
export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && . "/opt/homebrew/opt/nvm/nvm.sh"
# This loads nvm
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && .
"/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm"
# This loads nvm bash_completion
You can set $NVM_DIR to any location, but leaving it unchanged from
/opt/homebrew/opt/nvm will destroy any nvm-installed Node installations
upon upgrade/reinstall.
Type `nvm help` for further information.
==> Summary
🍺 /opt/homebrew/Cellar/nvm/0.38.0: 7 files, 176KB, built in 1 second
As you can see in the installation logs, you need to update the .zshrc file with the NVM details after you create .nvm file under ~/ location.
Fix:- Execute command: mkdir ~/.nvm
- Run command: brew --prefix nvm to know the installation location.
code2care@mac ~ % brew --prefix nvm /opt/homebrew/opt/nvm
- Open zsh profile file: nano ~/.zshrc
- Add the below line to the file:
export NVM_DIR="$HOME/.nvm" . "/opt/homebrew/opt/nvm/nvm.sh"
- Save the changes: Control + X followed by Y Key.
- Update changes: source ~/.zshrc
- Now try to run nvm commands: example: nvm list

nvm command not found zsh - brew installation
Have Questions? Post them here!
More Posts related to MacOS,
- Opening mac Terminal
- How to change default macOS Terminal Window size
- How to clear Mac Terminal screen
- Find Hostname of Mac running on macOS Ventura 13
- Installing MongoDB on Linux/Unix/macOS/Ubuntu
- How to switch from bash to zsh shell in macOS Terminal
- Limit scrollback rows in macOS Terminal
- How to Set Background Wallpaper on macOS 13 Ventura
- This operation couldnt be completed. Unable to locate a Java Runtime. [macOS]
- Encode or Decode Base64 String using Mac Terminal Command
- List of All Apple Silicon ARM Based M1/M2 Mac [updated Oct 2022)
- How to remove Siri from Menu Bar [macOS Big Sur]
- Must Know Homebrew Commands for Mac/Linux Users
- Hide Keyboard Text Input Icon on macOS Ventura Menu Bar
- 13.0 MacOS Ventura release date
- How to change the default location of Mac Screenshot
- How to set Out Of Office (OOO) on Outlook for Mac
- 30+ Zoom video communications application shortcuts for macOS
- How to install wget on macOS
- Mac turn dark mode on or off using terminal command
- Create Symbolic Link using Terminal Command
- Mac - How to Install VirtualBox
- How to Enable or Disable Dark Mode on macOS Ventura 13
- How to install homebrew (brew) on M1 Mac
- How to uninstall Microsoft Outlook on Mac
More Posts:
- Plug-in com.android.ide.eclipse.adt was unable to lead class Error - Android
- How to Rename a file using Mac Terminal - MacOS
- What is Bootstrap Jumbotron and how to use it - Bootstrap
- List of Java JDBC Database Driver Jars, Classes and URLs Details - Java
- Install Node on Mac Ventura 13 - MacOS
- How to display directory tree in Mac Terminal - MacOS
- Change Mouse Scrolling in Mac OS X - Mac-OS-X
- Robinhood unexpected server error - Android