LoginSignup
13
16

More than 5 years have passed since last update.

nodistでnode.jsのバージョン管理を行う(Windows)

Last updated at Posted at 2015-12-15

環境

Windows10 Home(32bit)

nodist 0.7.1インストール → 0.7.2にアップデート

nodistをインストールする

ファイルを配置してパスを通してもうまく動かなかったので素直にインストーラを使った

Installing with the official installer

  1. Download the installer here
  2. Run the installer and follow the install wizard

上記の箇所の[here]を押すとインストーラをダウンロードできる

powershellの$PROFILEでパスを設定する

環境変数永続的に変えてもいいけどpowershellでしか使わないので、プロファイル($PROFILE)に設定することにした

以下の設定をプロファイルに追記。インストール先などは適宜置き換えて下さい
(Visual Studioで入れたTypescriptより優先したいので前に追加します)

$PROFILE
$Env:Path = "C:\Program Files (x86)\Nodist\bin;.\node_modules\.bin;" + $Env:Path

node_modules/.binも入れておくとnpmでグローバルインストールしなくて済むので便利

nodistを利用する

nodistと依存関係のアップデートを行う

nodist selfupdate

インストールできるバージョンの一覧を見る

nodist ds

ほしいバージョンを指定してグローバルインストール&利用

nodist global 5.2.0

ディレクトリ内のみでバージョンを適用する
(.node-versionが作られる)

nodist local 5.2.0

インストールされているバージョンの一覧を見る

nodist ls

困ったときのヘルプ

nodist --help
13
16
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
13
16