Install NVM on Mac machine The Pit--NVM command not found

Source: Internet
Author: User

On Mac, I started by homebrew to install NVM, as follows:

Install NVM

After the installation is complete, enter the NVM list at the command line and notice that the following prompt appears:

what?!! I did not install the NVM.

Try a lot of scenarios, only one seems to be OK, after you open terminal, run the following code:

Export nvm_dir=~/--prefix NVM)/nvm. SH

You can run the NVM command on this open terminal page.

But, such a good trouble, we just have to open a new terminal will have to run as above code.

How to solve it? The reason for tracing the problem is that the brew installs the NVM itself bug, in the. nvm file, the following red box files are missing:

No words.

Since the brew itself is a problem, we have to go another way and install the NVM in one of the following ways:

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

Of course, an appeal order is executed, provided that the previously installed NVM is uninstalled using the Brew Uninstall NVM command.

Restarting or opening a new terminal execution NVM is OK.

Of course, the CD ~/.NVM to see all the files inside, nvm.sh will have.

If you are running NVM locally or command not found, check to see if the. bash_profile file is included, as follows:

ls grep . bash_profile

--Of course I do now.

If this file exists, it still prompts NVM command not found, then you can execute the The first command below opens the hidden file to view the contents of the. Bash_profile:

-If the file does not exist, see a new. bash_profile file

Write Killall // Show hidden files Write Killall // do not show hidden files

Normal. Bash_profile content is as follows:

SOURCE ~/. bashrcexport nvm_dir="$HOME/.nvm""$NVM _dir/ nvm.sh""$NVM _dir/nvm.sh  ""$NVM _dir/ Bash_completion""$NVM _dir/bash_completion"  # this loads NVM bash_completion

If not, copy and paste the content into your. bash_profile file to be OK.

Expand Reading

[1]. NVM--node version Manager

episode, MD sister just bought Iphone7 was stolen, the mood is really bad, draw a circle curse their family!!!

Install NVM on Mac machine The Pit--NVM command not found

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.