<commit_before>---
layout: post_en
title: Side by side install Nodejs and Haxe 
description: The simple way to manage multiple versions of Nodejs and Haxe
date: "2015-01-01 00:00:01 +0800"
author: kmshi
categories: [en]
keywords: haxe, javascript, js, html5, angular, cordova, openfl, nodejs, angularjs
---

Nodejs and Haxe are hotest technologies and they are envolving very quickly, sometimes you need stable version, othertimes you wanna to try latest developing version.

Is there a way to install different versions side by side?

The answer is YES.

###For nodejs, there is [n(node version manager)](https://www.npmjs.com/package/n):

####1. Install n
> $ sudo npm install -g n

####2. Install stable node version
> $ sudo n stable

####3. Install latest node version
> $ sudo n latest

####4. switch node to a specific version(Use the up / down arrow to navigate, and press enter to select, or ^C to cancel):
> $ sudo n
> $ node -v

###For Haxe, we have [hvm(Haxe Version Manager)](https://github.com/jasononeil/hvm):

####1. Setup Env to compile Haxe source (For Mac OSX)
- Install homebrew
> $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

- Install XQuartz (required by OCaml)
> $ brew install caskroom/cask/brew-cask && brew cask install xquartz

- Install OCaml
> $ brew install ocaml

####2. Install hvm
> haxelib install hvm

####3. Install and use stable haxe version(3.1.3)
> haxelib run hvm --use 3.1.3

####4. Install and use latest development haxe version
> haxelib run hvm --use development

####5. Switch haxe version

```
  haxelib run hvm --set <version>
```

That's all. Happy New Year! 2015!<commit_msg>Update hvm post<commit_after>---
layout: post_en
title: Side by side install Nodejs and Haxe 
description: The simple way to manage multiple versions of Nodejs and Haxe
date: "2015-01-01 00:00:01 +0800"
author: kmshi
categories: [en]
keywords: haxe, javascript, js, html5, angular, cordova, openfl, nodejs, angularjs
---

Nodejs and Haxe are hotest technologies and they are envolving very quickly, sometimes you need stable version, othertimes you wanna to try latest developing version.

Is there a way to install different versions side by side?

The answer is YES.

###For nodejs, there is [n(node version manager)](https://www.npmjs.com/package/n):

####1. Install n
> $ sudo npm install -g n

####2. Install stable node version
> $ sudo n stable

####3. Install latest node version
> $ sudo n latest

####4. switch node to a specific version(Use the up / down arrow to navigate, and press enter to select, or ^C to cancel):
> $ sudo n
> $ node -v

###For Haxe, we have [hvm(Haxe Version Manager)](https://github.com/jasononeil/hvm):

####1. Setup Env to compile Haxe source (For Mac OSX)
- Install homebrew
> $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

- Install XQuartz (required by OCaml)
> $ brew install caskroom/cask/brew-cask && brew cask install xquartz

- Install OCaml
> $ brew install ocaml
> $ brew install opam

####2. Install hvm
> haxelib install hvm

####3. Install and use stable haxe version(3.1.3)
> haxelib run hvm --use 3.1.3
> sudo neko /Users/kshi/work/haxe/lib/hvm/0,0,2/hvm.n --use 3.1.3

####4. Install and use latest development haxe version
> haxelib run hvm --use development
> sudo neko /Users/kshi/work/haxe/lib/hvm/0,0,2/hvm.n --use development

if you meet compile error, please enter ~/.hvm/haxerepo folder, run ```sudo make clean```, then try again.

####5. Switch haxe version

```
  haxelib run hvm --set <version>
```

That's all. Happy New Year! 2015!
{'fraction_non_alphanumeric': 0.12216694306246545, 'fraction_numerical': 0.023493642896627972, 'mean_word_length': 3.9643347050754456, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 30, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4666898', 'n_tokens_mistral': 1279, 'n_tokens_neox': 1193, 'n_words': 482}