When I run brew install node
it install v6.7.0 Current
but I want LTS version which is at the time of this writing v4.6.0 LTS
. Which commands I need to issue to install LTS version of Node via Homebrew.
Use Homebrew to install Node. js on MacOS. Homebrew is a better way to manage various packages on your Mac.
How To Install A Specific Version Of A Package. You can use the npm install command to download and install a package on your development environment. By default, the npm install command fetches the latest available version of the specified package—in this case, it's Renovate version 24.52.
If you're looking to install newer versions, like 0.11. x: (1) sudo apt-add-repository ppa:chris-lea/node. js-devel (2) Update: run sudo apt-get update (3) Then, to list the latest packages: sudo apt-cache showpkg nodejs (4) For example, to install 0.11. 14: sudo apt-get install nodejs=0.11.
You can use brew install node@4
, brew install node@6
, or brew install node@8
command to install LTS version of Node via Homebrew.
If another version of Node is already installed, you should uninstall it first to avoid conflicts.
Also note that LTS versions of node (e.g. node@10) are keg-only and must either be linked with --force (brew link --force node@10
) or you need to add the binary to your path by running:
echo 'export PATH="/usr/local/opt/node@10/bin:$PATH"' >> ~/.bashrc
You can always look up LTS and stable versions from node releases page and also look at homebrew formulae here.
It shows how u can install stable version vs other versions. For example right now, brew install node@10
will install LTS version 10.16.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With