4

I installed NodeJs with the following commands:

brew install node

It downloaded the version 5.5.0 of NodeJs.

I want the version 4.1.2 (for Ionic compatibility).

How to download this specific one?

I can't run brew switch node 4.1.2 since I've never downloaded it before.

Mik378
  • 21,881
  • 15
  • 82
  • 180
  • Possible duplicate of [Homebrew install specific version of formula?](http://stackoverflow.com/questions/3987683/homebrew-install-specific-version-of-formula) – Shanoor Jan 29 '16 at 13:45
  • 1
    Instead of homebrew, give nvm a try. https://github.com/creationix/nvm Allows easy switching between node versions, or easily updating node versions. – clay Jan 29 '16 at 13:47

2 Answers2

4

May I suggest using nvm instead?

With nvm you can switch between node versions really easy:

nvm install 4.2

And you can install multiple versions of node and switch between them as you wish.

Andrei CACIO
  • 2,101
  • 15
  • 28
2

You can search available versions of node to install by running:

brew search node

The closest version would be "node4-lts". To obtain that version, run:

brew install homebrew/versions/node4-lts

GlauberMD
  • 131
  • 1
  • 8