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 3 years have passed since last update.

nodebrewとnodeのバージョンが違う

Last updated at Posted at 2018-10-28
cd $HOME/.nodebrew/current/bin

$ ./node -v
v11.0.0

$ node -v
v10.5.0

npmのパスを調べる

npm bin -g

/usr/local/bin

cd /usr/local/bin

ここにいたので、ここのnodeを使わないように

pathを調べる
vi ~/.bash_profile

export PATH=$PATH:$HOME/.nodebrew/current/bin

nodebrewのパスを先に解決するように変更

export PATH=$HOME/.nodebrew/current/bin:$PATH

それでも変わらない場合

shellを確認する

chsh

↓ zshになっていれば
https://support.apple.com/ja-jp/HT208050

zsh用の設定を行う

vi .zprofile

export PATH=$HOME/.nodebrew/current/bin:$PATH
3
1
2

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?