Ask Your Question
0

How can I install nvm using Brew if "nvm: command not found" error occurs?

asked 2023-06-18 12:16:34 +0000

david gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-06-18 12:27:02 +0000

qstack gravatar image

If you are getting "nvm: command not found" error while trying to install nvm using Brew, then you can try the following steps:

  1. First, uninstall any existing versions of nvm by running the following command:

    rm -rf ~/.nvm
    
  2. Then, reinstall nvm using the following command:

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
    

    This will install the latest version of nvm.

  3. Once the installation is complete, open a new terminal window or run the following command to reload your shell:

    source ~/.bash_profile
    
  4. Finally, check if nvm is installed correctly by running the following command:

    command -v nvm
    

    If everything is working correctly, it should output "/Users/your-username/.nvm/nvm.sh" or something similar.

Note: Make sure to replace "your-username" in step 4 with your actual username.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-18 12:16:34 +0000

Seen: 10 times

Last updated: Jun 18 '23