0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【超簡単】VoltaでNode.jsをインストール&バージョン管理する方法

Posted at

Node.jsのバージョン管理って面倒…そんな方へ!Voltaで始める快適な開発環境

Node.jsのバージョン管理ってちょっと面倒…そう感じている方におすすめなのが Volta です!
Voltaを使えば、Node.jsのインストールもバージョンの切り替えも、たった1行のコマンドで完了します。

Voltaとは?

Volta は、Node.jsなどのツールを 高速かつ簡単に管理できるツールです。Rust製で非常に軽量・高速なのも魅力です。

Voltaのインストール方法

Windowsの場合(winget使用)

winget コマンドを使ってインストールします。
※ Windows 11や最新版のWindows 10で winget が使えます。

winget install Volta.Volta

または、公式サイトからインストーラーをダウンロードしてもOKです。

macOS / Linuxの場合

curl https://get.volta.sh | bash

Node.jsをインストールしてみよう!

Voltaのインストールが完了したら、Node.jsの導入も以下のコマンドでOKです。最新のLTSバージョンがインストールされます。

volta install node@lts

特定のバージョンを指定したい場合

@ の後にバージョン番号を指定します。

volta install node@20

インストール済みのバージョン確認

node -v

Node.jsのバージョンを切り替えるには?

Voltaでは、バージョンを指定して再度 install を実行するだけで切り替えが完了します。

volta install node@22

これで node@22 に切り替わりました。バージョン管理がとても楽ですね!

まとめ

Voltaを使うことで、以下のようなメリットがあります。

✅ Node.js の導入が簡単
✅ バージョン切り替えが1コマンド
✅ 軽量&高速でストレスフリー

Node.jsを使うすべての人に、Voltaはおすすめです!ぜひ試してみてください。

参考リンク

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?