LoginSignup
11
13

More than 5 years have passed since last update.

nodistを使ってWindows環境でnode.jsのバージョンを切り替える

Last updated at Posted at 2016-02-12

Macだとnodebrewとかndenvとかでnode.jsのバージョンを切り替えるのが常套手段。

Windowsにそういうのないのかなって調べたらnodistってのがあった。

インストール~使い方は大体こんな感じ。

  1. 公式からインストーラーをダウンロードする
  2. 適当にインストールする
  3. おもむろにコマンドプロンプトを立ち上げて、インストール可能なバージョンを見る
    > nodist dist
  4. 使いたいバージョンをインストールする
    > nodist + v4.3.0
  5. 任意のバージョンのnode.jsを使えるようにする
    システム全体に設定する場合
    > nodist 4.3.0
    任意のフォルダ内だけに設定する場合
    > nodist local 4.3.0

公式に以下のように書いてあるので、とりあえず既存のnode.jsは消しておこう。

Nodist was designed to replace any existing node.js installation, so if node is already installed on your machine, uninstall it first.

ちなみに僕はアホなので、Chakra入れているの忘れてて「なんでnodist動かないんだろう?」と悩んでました。(消したら普通にnodist動いた)

11
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
13