Dec 11, 2019 Homebrew: Homebrew is a popular package manager for the Mac operating systems. It is useful for installing most open source sofware like Node; Install Node.js on MacOS. Let’s start the installation of Node.js on your Mac system using Homebrew. So first update the Homebrew package manager index. Then npm update will install email protected, because that is the highest-sorting version that satisfies ^0.4.0 (= 0.4.0 Packages. Npm update -g will apply the update action to each globally installed package that is outdated – that is, has a version that is different from latest.
By Panu Pitkamaki
Development is picking pace, and Node.js is shipping out a new version frequently. It is nice to have the latest version at hand in your development environment to test out new features.
There are a few ways to install Node.js. One of the obvious ones is to download the installer from nodejs.org. However, you might not want to be downloading a new installer every time there's a new version out.
Here are few alternative ways to update to the latest version of Node.js on a Mac.
Nvm
Nvm is a script-based node version manager. You can install it easily with a curl and bash one-liner as described in the documentation. It's also available on Homebrew.
Assuming you have successfully installed nvm. The following will install the latest version of node.
The last option installs all global npm packages over to your new version. This way packages like mocha and node-inspector keep working.
N
N is an npm-based node version manager. You can install it by installing first some version of node and then running
npm install -g n .
Update Node Package
Assuming you have successfully installed n. The following will install the latest version of node.
Homebrew
Homebrew is one of the two popular package managers for Mac. Assuming you have previously installed node with
brew install node . You can get up-to-date with formulae and upgrade to the latest Node.js version with the following.
MacPortsInstalling Node.js Via Package Manager | Node.js
MacPorts is the other package manager for Mac. The following will update the local ports tree to get access to updated versions. Then it will install the latest version of Node.js. This works even if you have a previous version of the package installed.
Installation | Yarn
There also exists
nodejs alternative to nodejs-devel that follows the long term support line.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |