4
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.

node -vコマンドでzsh: command not found: nodeエラーになる

Posted at

エラー内容

以下コマンド実行時に zsh: command not found: node エラーとなる。

コマンド
% node -v
zsh: command not found: node

原因

~/.zshrc にパスが通っていない。

以下コマンドで ~/.zshrc を確認できる。

コマンド
cat ~/.zshrc

対処法

以下コマンドを実行する。
※ nodebrewでインストールしている場合

コマンド
echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.zshrc
source ~/.zshrc

node -v コマンドでバージョンが表示されれば成功。

% node -v
v18.15.0
4
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
4
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?