There’s just something poetic about using brew in Ubuntu’s GNU bash shell running on a Linux compatibility layer in Windows 10 natively. And it works surprisingly well. Windows Subsystem. Platform built on v8 to build network applications. Node js node 15 nodejs npm. On macos homebrew is the de facto standard and once installed allows you to install node js very easily by running this command in the cli.
Node.js can be installed in different ways. This post highlights the most common and convenient ones.
Official packages for all the major platforms are available at https://nodejs.org/en/download/.
One very convenient way to install Node.js is through a package manager. In this case, every operating system has its own.
On macOS, Homebrew is the de-facto standard, and - once installed - allows you to install Node.js very easily, by running this command in the CLI:
Other package managers for Linux and Windows are listed in https://nodejs.org/en/download/package-manager/
nvm
is a popular way to run Node.js. It allows you to easily switch the Node.js version, and install new versions to try and easily rollback if something breaks, for example.
It is also very useful to test your code with old Node.js versions.
Brew Nodejs Update
See https://github.com/nvm-sh/nvm for more information about this option.
Brew Nodejs 12
My suggestion is to use the official installer if you are just starting out and you don't use Homebrew already, otherwise, Homebrew is my favorite solution.
Brew Nodejs Version
In any case, when Node.js is installed you'll have access to the node
executable program in the command line.