Help us understand the problem. What is going on with this article?

Mac OSXにnodebrewをインストールする

More than 5 years have passed since last update.

node.jsのバージョン管理をしやすくするためにNodebrewをインストールします。

node.jsがインストールされている場合は以下のコマンドで削除

$ brew uninstall node

Homebrewをインストール

$ brew update
$ brew install nodebrew

node.jsの最新版をインストール

$ nodebrew install latest

コンパイルにしばらく時間がかかる場合があります

Node.jsインストールされたバージョンの確認

$ nodebrew list
v0.11.13

current: none

インストールしたNode.jsバージョンを有効にする

$ nodebrew use v0.11.13

パスの設定

$ echo 'export PATH=$PATH:/Users/ユーザー名/.nodebrew/current/bin' >> ~/.bashrc

Node.jsバージョンの確認

$ node -v
v0.11.13

以上です。

Nodebrewは複数のnode.jsを管理することができ、バージョンの切り替えもしやすいです。

$ nodebrew -h
Usage:
    nodebrew help                         Show this message
    nodebrew install <version>            Download and install a <version> (compile from source)
    nodebrew install-binary <version>     Download and install a <version> (binary file)
    nodebrew uninstall <version>          Uninstall a version
    nodebrew use <version>                Use <version>
    nodebrew list                         List installed versions
    nodebrew ls                           Alias for `list`
    nodebrew ls-remote                    List remote versions
    nodebrew ls-all                       List remote and installed versions
    nodebrew alias <key> <version>        Set alias to version
    nodebrew unalias <key>                Remove alias
    nodebrew clean <version> | all        Remove source file
    nodebrew selfupdate                   Update nodebrew
    nodebrew migrate-package <version>    Install global NPM packages contained in <version> to current version
    nodebrew exec <version> -- <command>  Execute <command> specified <version>

Example:
    nodebrew install v0.10.22     Install a specific version number
    nodebrew use v0.10.22         Use a specific version number

(Kandanをインストールする際にnodebrewを使用しました)

【参考】Kandanに関してのQiitaの記事:
http://qiita.com/tags/kandan

sakaitaka
Software Enginner / 興味: Ruby, Rails, Python, Java, Scala, C++, AI, NLP, ML, NoSQL / アジャイル開発
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした