美文网首页
mac下安装nvm

mac下安装nvm

作者: abelweiwencai | 来源:发表于2018-10-09 00:06 被阅读228次

    brew install nvm

    根据安装完成的提示(见文末)操作

    常用命令

    1. 查看可安装的node版本
      nvm ls-remote
    2. 查看已经安装的node版本
      nvm ls
    3. 安装其他版本node
      nvm install 8.9
    4. 查看当前使用node版本
      node --version
    5. 切换使用node版本
      nvm use 8.9.4
    6. 卸载某个版本node
      nvm uninstall 0.11

    参考链接

    安装nvm打印的信息

    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
    
    # If you come from bash you might have to change your $PATH.
    # export PATH=$HOME/bin:/usr/local/bin:$PATH
    
    # Path to your oh-my-zsh installation.
    export ZSH="/Users/qudian/.oh-my-zsh"
    
    # Set name of the theme to load. Optionally, if you set this to "random"
    # it'll load a random theme each time that oh-my-zsh is loaded.
    # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
    ZSH_THEME="robbyrussell"
    
    # Set list of themes to load
    # Setting this variable when ZSH_THEME=random
    # cause zsh load theme from this variable instead of
    # looking in ~/.oh-my-zsh/themes/
    # An empty array have no effect
    # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
    
    # Uncomment the following line to use case-sensitive completion.
    # CASE_SENSITIVE="true"
    
    # Uncomment the following line to use hyphen-insensitive completion. Case
    # sensitive completion must be off. _ and - will be interchangeable.
    # HYPHEN_INSENSITIVE="true"
    "~/.zshrc" 99L, 3287C
    
    Add the following to ~/.zshrc or your desired shell
    # If you come from bash you might have to change your $PATH.
    # export PATH=$HOME/bin:/usr/local/bin:$PATH
    
    # Path to your oh-my-zsh installation.
    export ZSH="/Users/qudian/.oh-my-zsh"
    
    # Set name of the theme to load. Optionally, if you set this to "random"
    # it'll load a random theme each time that oh-my-zsh is loaded.
    # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
    ZSH_THEME="robbyrussell"
    
    # Set list of themes to load
    # Setting this variable when ZSH_THEME=random
    # cause zsh load theme from this variable instead of
    # looking in ~/.oh-my-zsh/themes/
    # An empty array have no effect
    # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
    
    # Uncomment the following line to use case-sensitive completion.
    # CASE_SENSITIVE="true"
    
    # Uncomment the following line to use hyphen-insensitive completion. Case
    # sensitive completion must be off. _ and - will be interchangeable.
    # HYPHEN_INSENSITIVE="true"
    "~/.zshrc" 101L, 3347C
    
    configuration file:
    
      export NVM_DIR="$HOME/.nvm"
      . "/usr/local/opt/nvm/nvm.sh"
    
    You can set $NVM_DIR to any location, but leaving it unchanged from
    /usr/local/opt/nvm will destroy any nvm-installed Node installations
    upon upgrade/reinstall.
    
    Type `nvm help` for further information.
    
    Bash completion has been installed to:
      /usr/local/etc/bash_completion.d
    

    相关文章

      网友评论

          本文标题:mac下安装nvm

          本文链接:https://www.haomeiwen.com/subject/gipsaftx.html