What is the suggested way to install brew, node.js, io.js, nvm, npm on OS X?

后端 未结 9 1194
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-30 15:51

I am trying to use homebrew as much as possible. What\'s the suggested way to install the following on OS X?

  • node.js
  • io.js
  • nvm
  • npm
9条回答
  •  一个人的身影
    2020-11-30 16:44

    2019 update: Use NVM to install node, not Homebrew

    In most of the answers , recommended way to install nvm is to use Homebrew

    Do not do that

    At Github Page for nvm it is clearly called out:

    Homebrew installation is not supported. If you have issues with homebrew-installed nvm, please brew uninstall it, and install it using the instructions below, before filing an issue.

    Use the following method instead

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

    The script clones the nvm repository to ~/.nvm and adds the source line to your profile (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc).

    And then use nvm to install node. For example to install latest LTS version do:

    nvm install v8.11.1
    

    Clean and hassle free. It would mark this as your default node version as well so you should be all set

提交回复
热议问题