LoginSignup
0

More than 5 years have passed since last update.

nodist0.8.5でnpmをアップデートする

Last updated at Posted at 2016-09-09

nodistでnpmをアップデートする

nodistを使うことでNode.jsのバージョン管理が出来る。
nodistの説明はいろいろなところにあるので割愛。
今回はnpmのアップデート方法について説明する。

Node.jsを単体でインストールした場合

npm -g update npmとかnpm -g install npm
でアップデートが出来る。
今までもnodistを使っていてもこれでアップデートできていた気がする・・・
しかしnodist0.8.5にアップデートしたところ、
npmがこの方法だとアップデート出来なくなった。

nodistを使ってNode.jsをインストールした場合

nodistではNode.jsのバージョン管理以外にもnpmの管理もしている。

バージョン確認

nodist npm

バージョン追加

nodist npm add バージョン
例: nodist npm add 3.10.8

使用するnpmバージョンを指定(追加されてなかったら自動で追加して指定)

nodist npm バージョン
例: nodist npm 3.10.8

これでnpmの更新が出来る。
ちなみにlatestも出来るが、npmのv2も取ってきてしまうのでお勧めしない。
(2016/09/09 latestだとv2.15.11が落ちてくる)

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
0