3
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 1 year has passed since last update.

brew upgrade voltaしたら、nodeにPATHが通らなくなった時の解決法

Last updated at Posted at 2022-05-20

環境

  • macOS 12.3.1
  • Homebrew 3.4.11
  • Volta 1.0.5 -> 1.0.7

Volta

Voltaはクロスプラットフォームで使えるNodeとnpmのバージョン管理ツールです。かなり高速で、使い勝手も良いので、未導入の方は是非。

upgrade

voltaを最新にアップグレード

$ brew upgrade volta

command not found: node

nodeはおろかnpmも。焦る。

$ node -v
zsh: command not found: node

$ npm -v
zsh: command not found: npm

けど、voltaだけはPATHが通っている状態

$ volta -v
1.0.7

解決策

voltaをsetupすれば直りました。
もしかしたらupgradeした時にターミナルに出力されてたのかも。

$ volta setup
success: Setup complete. Open a new terminal to start using Volta!

ターミナルを再起動したらnodeのPATH通った!

$ node -v
v16.13.0
3
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
3
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?