Skip to content

Best way to install Node JS on OS X #3969

@surfeatsleep

Description

@surfeatsleep

While the installer available at https://nodejs.org/en/ seems logical to pick, there are numerous blog posts, tutorials, stackoverflow questions, etc. that point to and even highly recommend alternatives.

All of these different recommendations make installing Node JS on OS X a bit confusing.

My question is:
regarding simplicity of installing, updating and uninstalling as well as being safe to use (even for beginners), which of the following is the best way to install Node and why:

  • use the installer from https://nodejs.org/en/
  • homebrew
  • nvm
  • using homebrew to install nvm and than using nvm to install Node (this seems to be the top recommended alternative to the installer)
  • any other way

Some of the reasons why to choose each of the methods:

Use installer
Easiest to install.
Although it seems to be suggested as the best way, since it is on the Node JS homepage, it can be difficult to uninstall, requires adding the path to the node executable to your system $PATH and also affects admin-only system folders.

Homebrew
Easy to uninstall and update, does not require sudo for installing node packages globally.
However it can be a bit buggy at times, needing for workarounds to make it work correctly.

nvm
Easy to uninstall and update, allows multiple versions.
This seems to be quite a good alternative, yet might seem a bit too much if you only need the latest version.

Homebrew to install nvm, nvm to install node
Benefits of easier updating nvm (along with other software used) while getting the flexibility of nvm to work with node, also nvm supposedly installs Node JS in a better way than homebrew directly.
The negative is you install two things simply to install and manage the third.

Any other way
more customisation?
Not sure about the benefits or issues with other alternatives

Metadata

Metadata

Assignees

No one assigned

    Labels

    macosIssues and PRs related to the macOS platform / OSX.questionIssues that look for answers.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions