node 5.5.0 already installed but node -v fetches with “v4.2.1” on OS X & homebrew?

后端 未结 2 1533
囚心锁ツ
囚心锁ツ 2020-11-28 00:17

I\'m trying to update my nodejs v4.2.1 to the latest version and successfully got that. But node -v still gives me \'-v4.2.1\'.

2条回答
  •  萌比男神i
    2020-11-28 00:29

    Your path contains /usr/local/bin before /usr/local/Cellar. Since the version of node you're using is the homebrew one, fix it with:

    PATH="/usr/local/Cellar:$PATH"
    

    Next time you have a problem with brew, run brew doctor, it would have told you what to do

提交回复
热议问题