タイトル : Voltaでnodeを使おう 2026/02
更新日 : 2026-03-05
カテゴリ : プログラミング
タグ :
linux   
nodejs   
volta   

Voltaが良くて流行っているらしい

Node.jsバージョン管理ツール『Volta』を使ってみる https://qiita.com/nakashun1129/items/47c09ccbbba73c4ef8c4

Node.jsのバージョン管理ツールVoltaをちょっと紹介するのだ https://zenn.dev/sasori_256/articles/880e06b3b94b38

【Node.js】バージョン管理ツールVoltaの使い方 https://wingdoor.co.jp/blog/%E3%80%90node-js%E3%80%91%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E7%AE%A1%E7%90%86%E3%83%84%E3%83%BC%E3%83%ABvolta%E3%81%AE%E4%BD%BF%E3%81%84%E6%96%B9/

Node.js管理ツールのVoltaについて https://qiita.com/H-Iida/items/2a0d9d10ce6b2efd56bd

【JavaScript】 Volta で Node.js のバージョンを管理する https://retrotecture.jp/sundayprog/javascript_volta.html

VoltaでNode.jsのDefaultバージョンを指定する方法 https://dev.classmethod.jp/articles/volta-set-default-version/

VoltaでNode.jsをバージョン管理する https://www.ios-net.co.jp/blog/20230830-1339/

最近評判のよりvoltaでnode.jsをインストールする https://www.scice.co.jp/webtech/468.html

Volta The Hassle-Free JavaScript Tool Manager

  # install Volta
  curl https://get.volta.sh | bash

  # install Node
  volta install node

  # start using Node
  node

インストール

ちなみに、/usr/binにnodeが先に入っている状態です。

$ whereis node
node: /usr/bin/node /usr/include/node /usr/share/man/man1/node.1.gz
$ node --version
v22.21.0
$ 

本家のサイトを参考にしてインストール

$ curl https://get.volta.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10460  100 10460    0     0  16190      0 --:--:-- --:--:-- --:--:-- 16217
  Installing latest version of Volta (2.0.2)
    Checking for existing Volta installation
    Fetching archive for Linux, version 2.0.2
######################################################################## 100.0%
    Creating directory layout
  Extracting Volta binaries and launchers
    Finished installation. Updating user profile settings.
Updating your Volta directory. This may take a few moments...
success: Setup complete. Open a new terminal to start using Volta!
$ 

メッセージにあるように新ターミナル開きます

nodeを入れる

$ volta list node
⚡️ No Node runtimes installed!

    You can install a runtime by running `volta install node`. See `volta help install` for
    details and more options.
$ volta --version
2.0.2
$

latest入れてみる

$ volta install node@latest
success: installed and set node@25.8.0 (with npm@11.11.0) as default
$ whereis node
node: /usr/bin/node /usr/include/node /home/prost/.volta/bin/node /usr/share/man/man1/node.1.gz
$ node --version
v25.8.0
$

そうか。今25なのね。LTSの24も入れてみます。

$ volta install node@24.14.0
success: installed and set node@24.14.0 (with npm@11.9.0) as default
$ volta list node
⚡️ Node runtimes in your toolchain:

    v24.14.0 (default)
    v25.8.0
$ node --version
v24.14.0
$ 

defaultは後に入れた方になるルールなのかな。