2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

anyenvでインストールしたnodenvのインストールリストを更新した話

Posted at

node.jsのホームページで推奨版のバージョンを確認してみた

https://nodejs.org/ja/
スクリーンショット 2020-04-21 16.19.52.png

インストールしてるnode.jsのバージョンを確認してみる

$ node --version
v10.13.0

だいぶ古い。。。

nodenvでインストールできるバージョンを確認してみる

$ nodenv install -l
0.1.14
0.1.15
0.1.16
...
11.10.1
11.11.0
11.12.0

12のメジャーバージョンが無い。。。

anyenvのgithubページを覗いてみる

README.mdの最後にPluginsとznz/anyenv-updateと言う気になるリンクがある。
もちろんリンクをクリック!

anyenv-updateをインストール

$ mkdir -p $(anyenv root)/plugins
$ git clone https://github.com/znz/anyenv-update.git $(anyenv root)/plugins/anyenv-update
$ anyenv update

インストールと使い方を実行する。
すごい更新されてる感じがする。

もう一度nodenvでインストールできるバージョンを確認してみる

$ nodenv install -l
0.1.14
0.1.15
0.1.16
...
12.16.2
...
13.11.0
13.12.0
13.13.0

出てきた!(メジャーバージョン13まで出てきた)

推奨版のnode.jsをインストールする

$ nodenv install 12.16.2
$ nodenv rehash

インストールしたバージョンに切り替える

$ nodenv global 12.16.2

最後にインストールしたnode.jsのバージョンを確認する

$ node -v
v12.16.2

おしまい👏👏👏

2
1
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?