Fix: "zsh: command not found: nvm" Error on Mac

Fix:
User
5 Min Read
2025/05/04

when nvm (Node Version Manager) is used by Mac users, they may come across the zsh command not found nvm error. It happens when for zsh shell the nvm command could not be located in any of your PATH environment variable directories. Fortunately, there are some steps you can do to fix this problem and make sure that your Mac runs well with nvm. In this tutorial we will attempt to resolve zsh command not found nvm issue on your Mac. If you are a MacOS user who is into virtual servers then it is advisable that you opt for any type of VPS server depending on what you want and pay through Perfect Money or digital currencies.

Step 1 – Check NVM Installation to Fix zsh: command not found: nvm

Before starting on any troubleshooting steps, it is important to confirm that nvm has been installed correctly. Open the a terminal window and type in the following command:

nvm --version

At this point you should see the version number.

If not, then you will have to download nvm using one of these commands for your system from homebrew:

brew install nvm

You can always install or update NVM from its official GitHub repository.

Step 2 – Edit .zshrc File to Resolve NVM Not Found on Mac

The next step is to edit the .zshrc file, which is the configuration file for the zsh shell. Open the a terminal and enter the command:

sudo nano /etc/zshrc

Look for any lines related to nvm and ensure they are uncommented (remove any preceding hashes ‘#’ if present). The relevant lines may look like to be this:

export NVM_DIR="$HOME/.nvm"
. "/usr/local/opt/nvm/nvm.sh"\

Save the changes to the .zshrc file by pressing CTRL+X, followed by Y, and then Enter.

Step 3 – Reload zsh to Apply Fix for nvm Command Not Found Error

After alteration of .zshrc file, it should be saved to reflect the modifications made. In a terminal type the following command:

source /etc/zshrc

This will result in reloading of .zshrc and updating of shell with the changed settings.

Step 4 – Verify nvm Works in zsh After Fixing Command Not Found Error

To ascertain whether or not the problem is fixed, reissue the nvm command like this:

nvm --version

If zsh command not found nvm error does not appear anymore and it outputs version number, congratulations – you have successfully solved this issue.

Conclusion

However, the “zsh: command not found: nvm” error can be really annoying. It is not a big deal to dealing with this issue on your Mac if you stick to the steps provided in this article. Checking out nvm installation process, amending the .zshrc file by including necessary configurations and saving it for changes update will all enable you have nvm working properly without “command not found” errors. Thus, once nvm works fine, you can easily change various Node.js versions on MacOS as per your needs for development purposes.

0 out of 0 votes
Leave a Reply

Full Name*
Email*
Comment *

Calculate the value of 9 - 9 :

Save my name, email, and website in this browser for the next time I comment.
Recent Replies
Show More

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+8595670151

7 days a week, 24 hours a day