After nvm is installed successfully, but the command is not available (command not found)

After the Nvm installation is successful, the command not found is displayed when the nvm command is used . The mac terminal solution is as follows: 1. Enter the nvm installation to the file directory       cd  ~ /.nvm  2. Check the file list in the directory
      ls 
 3. If there is no .bash_profile file, then Create this file:  Steps to create a file:  3.1 touch .bash_profile
 3.2 open .bash_profile
    3.3 Paste the following files into the .bash_profile file .
 The file is related to your own computer. If you don't know it, you can run the following command, which will prompt this statement)   curl - o - https :// raw .curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bashexport NVM_DIR="/Users/magicdawn/.nvm"[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm  githubusercontent.com/creationix/nvm/v0.25.4/install.sh|bash 3.4 Save the file , close this file  3.5 Update the environment you just configured light  source .bash_profile 4.      Enter the nvm command to verifyitis successful,  such as nvm use 6.10 . 2.Ifthis versionnodeinstalledthat you have switched to this version.If it is not installed, it will prompt that this version is not installed, please install it. At this point,nvmcan be used normally 
       

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326014674&siteId=291194637